Rabu, 17 Oktober 2012
Installing MySql in Slackware 13.37 - prepare by Nurul
Installing Mysql - Slackware 13.37
1. Slackware does not install mysql automatically. User need to install on thier own.
2. you have to use root password,type mysql_install_db
2.1 you can see some information typing the above command.It asking you to create root password.
2.2 in order to create the password u need to start the db first
2.3 to start db, go to this path /var/lib/mysql and change the owner of all file to mysql.
The command i use is: chmod -R mysql.mysql *
3. on succesful,start the mysql.the command i used : /etc/rc.d/rc.mysqld start
4. Then type this command to create the password:/usr/bin/mysqladmin -u root password 'p@ssw0rd'
5. currently,there's no connection between outside client to access this database.you have to grant permission to the client.
5.1 first,login to the database;command :mysql -u root -p ... enter your password
5.2 on successful login,you'll be given mysql prompt mysql>
5.3 at the prompt type this command: grant all privileges on *.* to 'userid1'@'%' identified by 'p@ssw0rd' with grant option;
5.4 the command is actually telling you that userid1 can access all tables in the database and the '%' means that 'userid1' can
access the dbase form any ip.If you want to limit athe access,you have to rplace the '%' with ip address.
6.The mysql configuration n need to be placed in /etc directory.You can choose file that suitable to your server requirement
The files are ; my_huge.cnf ,my_large.cnf,my_medium.cnf and my_small.cnf.Open and view this file,you can see difeerent parameter
for each one of them
6.1 copy the chosen file to /etc/my.cnf
for me, i choose my-huge.cnf to copy to my.cnf because my RAM is big
7.So far, if you trying to connect the dbase through the client, you will failed.The last step you need to do is put # to this statement inside the rc.mysqld file
the statement: SKIP="--skip-networking".
8.then restart the rc.mysqld
9.Now,you can connect through the client. Happy using mysql,the best DB in the world!!