How to setup MySQL

Here are the tips I learned while setting up MySQL

  1. # yum install mysql mysql-server
  2. Edit /etc/my.cnf and enter datadir information (i.e /mysql/data)
  3. Bring up /etc/init.d/mysqld start
  4. Start MySQL server
  5. Change the mysql root user password type: mysqladmin -u root password 'newpassword'
  6. Test connecting to mysql Type: mysql -u root -p enter the password when prompted.



To index 3 charater words add the following to the /etc/my.cnf file at the end of the [mysqld] section.



Then restart the mysql service, and run the following sql.