Install MySQL

First consider fallowing all the previous steps the WD MyBook World Edition Hacks tutorial

Please read the official MySQL documentation before proceeding. MySQL Installation Using a Source Distribution

  • Add a login user and group for mysqld.
# groupadd mysql
# useradd -g mysql mysql
  • Be sure that /tmp directory can be accessed by mysql user.
# chmod -R 777 /tmp
  • Choose a directory to unpack the distribution.
# cd /tmp
# wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51.tar.gz/from/http://ftp.astral.ro/mirrors/mysql.com/
  • Rename downloaded file.
# mv index.html mysql-5.0.51.tar.gz
  • Uncompress source archive.
# gunzip < mysql-5.0.51.tar.gz | tar xvf -
  • Change the location in unpacked distribution directory.
# cd mysql-5.0.51
# ./configure --prefix=/usr/local/mysql --with-low-memory
# make
  • Install the distribution.
# make install
  • Setup an option file.
# cp support-files/my-medium.cnf /etc/my.cnf
  • Change location in the installation directory.
# cd /usr/local/mysql
  • Assign mysql user and group to installed files.
# chown -R mysql .
# chgrp -R mysql .
  • Create the mysql data directory and initialize the grant tables.
# bin/mysql_install_db --user=mysql
  • Add shared libraries and mysql library path.
# ldd /usr/local/mysql/bin/mysql
# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
# ldconfig
  • Assing mysql user to data directory.
# chown -R root .
# chown -R mysql var
  • Start mysql server.
# bin/mysqld_safe --user=mysql &
  • To start mysql server automaticaly when device is started:
# cp support-files/mysql.server /etc/init.d/mysql
# chmod +x /etc/init.d/mysql
# ln -s /etc/init.d/mysql /etc/init.d/S40mysql
# bin/mysqladmin version
# bin/mysqladmin variables
# bin/mysqlshow
# bin/mysqlshow mysql
# less /etc/my.cnf 
  • Login to the mysqlserver and set root password.
# bin/mysql
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
SET PASSWORD FOR 'root'@'HOST_NAME' = PASSWORD('newpwd');
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('newpwd');
DROP USER '';
DROP USER ''@'localhost';
DROP USER ''@'HOST_NAME';
 
devices/mybookworld/mysql.txt · Last modified: 2008/04/29 11:00 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki