Configuring MySQL
Posted by Chief on Nov 12, 2009 in System Administration
No Comments
The following is how I set up MySQL on wharf.
- First, ensure mysql is installed:
ls /etc/init.d/my* - Now, make mysql start on boot:
sudo /sbin/chkconfig --level 35 mysqld on - Start the mysql server:
sudo /etc/init.d/mysqld start - Make MySQL more secure:
sudo /usr/bin/mysql_secure_installation - Log into mysql as root:
mysql -u root -p [to be entered by prompt] - Add another mysql user:
mysql> CREATE USER 'newuser'@'%' IDENTIFIED BY 'newuserpass';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON *.* TO 'newuser'@'%';
mysql> FLUSH PRIVILEGES; - Exit mysql:
mysql> exit - Test:
mysql -u <newuser> -p <newuserpass>