Some people are having problem when they started to use Slackware and wanted to have a Database Server. Slackware comes with MySQL as the default database server, but there are plenty of options out there. When they have finished the installation and tried to reboot for the first time, MySQL was started correctly, but in the next few seconds, it will be ended. It's not an error by Slackware nor MySQL packages. It's just not been configured by default.
This article will help you configuring MySQL for the first time after you have installed Slackware on your system. More detailed about configuring MySQL after pre-configuration will be out of the scope of this article, and i suggest you to look for the MySQL manuals for that.
If you haven't installed Slackware, then i suggest you to disable MySQL services first. We can enable this service later on after we have configure MySQL. But, if you already have Slackware installed and MySQL service was enabled, we will deal with that also, so don't worry about it.
There are two ways of solving this problem and i will describe all of them. The first solution is by using root account. Here are the steps:
su -mysql_install_dbchmod -R 755 /var/lib/mysqlchown -R mysql.mysql /var/lib/mysql/etc/rc.d/rc.mysqld restart
The other solution is a lot simpler:
su -su mysqlmysql_install_db/etc/rc.d/rc.mysqld restart
But it's recommended to run chown and chmod commands just to make sure that the permission is correct, so i suggest that you use the first method.
After running all those commands, your new MySQL daemon will be correctly started at boot time. In case you have disabled the MySQL daemon at installation, you can enable them again by running this command:
chmod +x /etc/rc.d/rc.mysqldThat's it, you can start connecting to your MySQL by running:
mysql
It's also recommended to add more security layer by providing password to access the MySQL server (by default, anybody can access it without having to give any password.
By using a simple tricks like above, we can have one of the most powerful database server on our system. Cool right?
Last Update : 3 August 2007 :: 22:26:41
Comments