Setting Up MySQL Databases for New Websites
Workflow
- Remote Desktop to the development web server
- MySQL Administrator
- Login as "root"
- Catalogs > schema list > right click > Create New Schema (Ctrl+n)
- User Administration > user list > right click > Add new user
- User Information tab
- Enter login
- Generate password using cPanel's MySQL administration
- Login to cPanel
- Databases > MySQL Databases
- MySQL Users > Password Generator > copy the password string
- Save the password in the site configuration
- Enter the password in MySQL Administrator
- Schema Privileges tab
- Select the new database from the Schemata list
- Click the << button to move all Available Privileges to the Assigned Privileges column.
- Click Apply changes
- User Information tab
- Service Control
- Click Stop Service
- Click Start Service
TODO
Research creating a script to create new databases for websites.
# log in
shell> mysql -h {host} -u root
# create the database
mysql> CREATE DATABASE {database_name};
# create the user
# grant user privileges on the database