I had some trouble getting basic installation of MySQL to work, so here’s a ground-up tutorial.
- Install mysql and mysql-server from the repositories. On Fedora, that’s ‘sudo yum install mysql’ and the same with ‘mysql-server’.
- To run the MySQL server, you have to run the command ‘/etc/rc.d/init.d/mysqld start’. (You may need to run this as root by prefacing with ‘sudo’.)
- The problem I ran into was, it was trying to use the innodb database, which is not installed by default. So you need to edit the file ‘/etc/my.cnf’. Under the section [mysqld], add the lines:
- Now run ’/etc/rc.d/init.d/mysqld start’ and it should say things are going ok. If not, you’ll have to check the error log file ‘/var/log/mysqld.log’ to see what went wrong.
- Now, from a terminal, run ‘mysql’. It should connect to the database you have running. This should open up in interactive MySQL interpreter where you can enter commands like “SHOW DATABASES;”.