Thread: Starting MySQL

  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Rep Power

    Unhappy Starting MySQL


    I would appreciate any help on the following. I have searched the mailing list for information But have not come up with a solution for my situation which has been frustrating. I think I need some things need to be clarified.

    The OS that is running is RedHat V.9.0 linux. MySQL was installed when RedHat V.9.0 was installed. Here are the packages that that I have installed
    Shell> rpm -qa | grep -i mysql

    First, I went to the MySQL website to look up the section on Unix Post-installation Procedures. I then tried the following as root and got the following result:
    Shell> cd /usr/bin
    Shell> mysql_install_db
    Installing all prepared tables
    040120 12:00:51 /usr/sbin/mysqld: Shutdown Complete

    To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system

    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h password 'new-password' See the manual for more instructions.

    NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command!

    You can start the MySQL daemon with:
    cd / ; /usr/bin/mysqld_safe &

    You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests

    Please report any problems with the /usr/bin/mysqlbug script!

    Shell> mysqld_safe --user=mysql &

    Starting mysqld-max daemon with databases from /var/lib/mysql mysqld ended

    I get the exact same response if I do su mysql first as well.

    The error log mysqld has the following as the most recent entry. 040120 12:01:05 mysqld started 040120 12:01:05 Can't start server: Bind on TCP/IP port: Address already in use 040120 12:01:05 Do you already have another mysqld server running on port: 3306 ? 040120 12:01:05 Aborting

    040120 12:01:05 /usr/sbin/mysqld-max: Shutdown Complete

    040120 12:01:05 mysqld ended
    I have already tried

    If I try something like
    Shell> service mysqld start
    I get
    Mysqld: unrecognized service

    I have tried things such as:
    shell> groupadd mysql
    shell> useradd -g mysql mysql
    shell> chown -R mysql /var/lib/mysql
    shell> chgrp -R mysql /var/lib/mysql
    shell> chown -R root /usr/local/mysqlcc-0.9.3-linux-glibc23
    shell> chgrp -R mysql /usr/local/mysqlcc-0.9.3-linux-glibc23
    shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &

    I have also typed in
    Shell> mysql
    I get
    Error 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    I tried to see is MySQL was running by typing in

    Shell> ps -eaf |grep -i mysqld
    root 14437 13954 0 Jan19 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --user=mysql
    mysql 14463 14437 0 Jan19 pts/0 00:01:13 [mysqld-max]
    root 16210 16183 0 14:34 pts/1 00:00:00 grep -i mysqld

    I am not sure how to be able to start MySQL running and using it. I have tried a number of things.
    Also, I don't think that this has any effect but I am also
    running PostgreSQL on the same server.

    Thanks very much for your help.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    No es importante
    Rep Power
    Kill the running process with -9 if you have to, then setup your my.cnf file and try starting the server again.
    El éxito consiste en una serie de pequeñas victorias día a día

    MySQL, MS SQL, MS ACCESS, Oracle Database Manager -

IMN logo majestic logo threadwatch logo seochat tools logo