Find the answer to your Linux question:
Results 1 to 2 of 2
Hi friends , I've installed the Mysql using the self extracting binary. To install the MySQL i used following commands, [root@localhost local]# tar -zxvf mysql-standard-5.0.27-linux-i686.tar.tar To add a mysql user ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    4

    Question Fail to start the MySQL server


    Hi friends ,

    I've installed the Mysql using the self extracting binary.
    To install the MySQL i used following commands,
    [root@localhost local]# tar -zxvf mysql-standard-5.0.27-linux-i686.tar.tar

    To add a mysql user account and group to server.
    [root@localhost local]#groupadd mysql
    [root@localhost local]#useradd -g mysql mysql

    To make a symbolic link between /usr/local/mysql and /usr/local/mysql-standard-5.0.27-linux-i686
    [root@localhost local]#ln -s mysql-standard-5.0.27-linux-i686 mysql

    run the script to install the default databases.
    [root@localhost local]#cd mysql
    [root@localhost mysql]#./scripts/mysql_install_db

    to change the permissions for the MySQL
    [root@localhost mysql]#chown -R root /usr/local/mysql
    [root@localhost mysql]#chown -R mysql /usr/local/mysql/data
    [root@localhost mysql]#chgrp -R mysql /usr/local/mysql/
    [root@localhost mysql]#chown -R mysql /usr/local/mysql/bin



    To start the server
    [root@localhost mysql] /usr/local/mysql/bin/safe_mysqld --user=mysql

    But its gives following Error and Stop the database

    [1] 1212
    [root@localhost mysql]# Starting mysqld daemon with databases from /var/lib/mysql
    STOPPING server from pid file /var/run/mysqld/mysqld.pid
    070227 17:12:31 mysqld ended


    [1]+ Done /usr/local/mysql/bin/safe_mysqld --user=mysql

    whats the reason for this , and how could i resolve this issue ?
    Should i've to configured something else also ?


    Regards,
    Sachin Warang.

  2. #2
    Just Joined!
    Join Date
    Feb 2007
    Posts
    4

    Thumbs up Re: Fail to start the MySQL server

    Hi friends ,
    I've missed the steps to configure the my.cnf file before initialized the database.
    I've follow the following steps and it works fine for me ,

    Unpack, place, and symlink...
    ...]# tar -xzf mysql-standard-5.0.27-linux-i686-icc-glibc23.tar.gz
    ...]# mv mysql-standard-5.0.27-linux-i686 /usr/local/
    ...]# cd /usr/local
    /usr/local]# ln -s mysql-standard-5.0.27-linux-i686-icc-glibc23 mysql

    Create Mysql User and Group
    Note that, chances are good, the MySQL user/group is already established on your system.
    Create new group 'mysql' under /etc/group, and add new user 'mysql' under the group 'mysql'...
    /usr/local]# cd mysql
    /usr/local/mysql]# groupadd mysql
    /usr/local/mysql]# useradd -g mysql mysql

    my.cnf

    The location of my.cnf is searched in the order of: global options - /etc/my.cnf, server-specific options - /usr/local/mysql/data/my.cnf, user-specific options - ~/my.cnf


    /usr/local/mysql]# cp support-files/my-medium.cnf /etc/my.cnf

    Note that if you are using PHP 4.4 to access MySQL 4.1+, you can only do so with the built in php extension 'php_mysql' [vs. extension 'php_mysqli' that ships with PHP 5], and will need to revert, under MySQL, to the old_password hash method...



    Edit my.cnf, add to section '[mysqld]'...


    old_passwords = 1
    Initialize Database

    Create the mysql database, privilege tables, and the func table...


    /usr/local/mysql]# ./scripts/mysql_install_db --user=mysql
    Directory Premissions

    Change user:group ownership to 'root:mysql' under all files and directories of /usr/local/mysql...

    /usr/local/mysql]# chown -R root:mysql .

    Change user:group ownership to 'mysql:mysql' under all files and directories of /usr/local/mysql/data...

    /usr/local/mysql]# chown -R mysql:mysql data

    Startup
    Start the MySQL Daemon
    There are several ways to start the MySQL daemon, choose one that suits your needs.

    [Default] Listen on all interfaces (0.0.0.0)...
    /usr/local/mysql]# ./bin/mysqld_safe --user=mysql &

    Listen on loopback only (127.0.0.1)...
    /usr/local/mysql]# ./bin/mysqld_safe --user=mysql --bind-address=127.0.0.1 &


    Setting an administrator password for MySQL
    [root@localhost mysql]# ./bin/mysqladmin -u root -p password 'root'
    Enter password : <Enter the set password>
    [root@localhost mysql]# ./bin/mysqladmin -u root -h localhost.localdomain –p password 'root'
    Enter password : <Enter the set password>


    To Stop the MySQL server on local machine
    [root@localhost mysql]# ./bin/mysqladmin -p shutdown
    Enter password:<Enter the set password>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •