Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2006
    Posts
    63

    Unanswered: Problem on installing MySQL

    Hi folks,


    Ubuntu 7.04 server amd64
    MySQL 5.0.38


    On installing MySQL and coming to;

    $ sudo mysqladmin -h ubuntu.xyz.com root password myrootsqlpassword
    Code:
    mysqladmin: connect to server at 'ubuntu.satimis.com' failed
    error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 111'
    $ hostname -f
    Code:
    ubuntu.xyz.com
    $ ps aux | grep mysql
    Code:
    root      4557  0.0  0.0   3860   572 ?        S    20:35   0:00 /bin/sh /usr/bin/mysqld_safe
    mysql     4599  0.0  1.0 160556 21992 ?        Sl   20:35   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
    root      4600  0.0  0.0   3768   576 ?        S    20:35   0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
    satimis   5133  0.0  0.0   5028   828 pts/1    S+   21:15   0:00 grep mysql

    $ cat /var/log/daemon.log | grep 111
    No printout

    $ cat /var/log/messages | grep 111
    Code:
    Oct 23 08:54:28 ubuntu kernel: [   24.857900] ata2.00: ATA-7: Maxtor 6V160E0, VA111900, max UDMA/133
    Oct 23 08:54:28 ubuntu kernel: [   33.667111] i2c_adapter i2c-1: nForce2 SMBus adapter at 0x1c40
    Oct 23 09:50:31 ubuntu kernel: [   23.021112] io scheduler cfq registered (default)
    Oct 23 09:50:31 ubuntu kernel: [   25.185695] ata2.00: ATA-7: Maxtor 6V160E0, VA111900, max UDMA/133
    Oct 23 09:50:31 ubuntu kernel: [   27.717111] sd 1:0:0:0: Attached scsi disk sda
    Oct 23 09:50:31 ubuntu kernel: [   33.805111] ACPI: PCI Interrupt Link [AAZA] enabled at IRQ 21
    Oct 23 19:05:48 ubuntu kernel: [   25.327627] ata2.00: ATA-7: Maxtor 6V160E0, VA111900, max UDMA/133
    Oct 23 19:43:21 ubuntu kernel: [   22.142111] ACPI: PCI Interrupt Link [LNK8] (IRQs 5 7 9 10 11 14 15) *0, disabled.
    Oct 23 19:43:21 ubuntu kernel: [   25.058170] ata2.00: ATA-7: Maxtor 6V160E0, VA111900, max UDMA/133
    Oct 23 19:43:21 ubuntu kernel: [   33.379111] i2c_adapter i2c-0: nForce2 SMBus adapter at 0x1c00
    Oct 23 20:35:27 ubuntu kernel: [   24.573772] ata2.00: ATA-7: Maxtor 6V160E0, VA111900, max UDMA/133
    Please advise which log file I have to check? How to fix this problem? TIA


    B.R.
    satimis

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    have you proved that MySQL is actaully running? .. check the services running.. don't know Ubuntu but on SUSE your could check the PID's, look in the servic es tab.
    can you use MySQL at the command line? type MYSQL
    look at the MySQL log file... depending on your confg its probably in the same directory as the startup scripts log files

  3. #3
    Join Date
    Jun 2006
    Posts
    63
    Quote Originally Posted by healdem
    have you proved that MySQL is actaully running? .. check the services running.. don't know Ubuntu but on SUSE your could check the PID's, look in the servic es tab.
    can you use MySQL at the command line? type MYSQL
    look at the MySQL log file... depending on your confg its probably in the same directory as the startup scripts log files
    Thanks for your advice.


    # ps -ef | grep mysql
    Code:
    root      4616     1  0 Oct23 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
    mysql     4658  4616  0 Oct23 ?        00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
    root      4659  4616  0 Oct23 ?        00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
    root      5515  5448  0 01:02 pts/0    00:00:00 grep mysql
    # ps -ef | grep pid
    Code:
    root        36    11  0 Oct23 ?        00:00:00 [kacpid]
    mysql     4658  4616  0 Oct23 ?        00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
    root      4788     1  0 Oct23 ?        00:00:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive
    root      5517  5448  0 01:02 pts/0    00:00:00 grep pid
    $ which mysql
    Code:
    /usr/bin/mysql
    It is there.


    I have been looking for look at the "MySQL log file" and can't ascertain which is the right one. Any advice. TIA


    B.R.
    satimis

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    So MySQL is running...
    can you run MYSQL on the command line.. if so SHOW mysqld LOG FILES; may help you

    failing that id try to install the GUI tools fromt eh MySQL website and see if its an admin userid/password problem

    you may be able to find the location of the logfiewl fromt he startup config file for MySQL...... whihc I think is my.cnf and will be in the tree of the binaries or the etc trees. again it depends on your distribution and how you installed the server

    alternatively you could do a locate of find mysql.log

    I forget which command it is that does a disk trawl to find a file in MS DOS it would be dir \mysql.log /s for each and every mounted drive until you find it. but its a while since I've delved into the Linux command line. if you have a GUI file manager that should be able to find the file for you
    Last edited by healdem; 10-24-07 at 09:29.

  5. #5
    Join Date
    Jun 2006
    Posts
    63
    Quote Originally Posted by healdem
    So MySQL is running...
    can you run MYSQL on the command line.. if so SHOW mysqld LOG FILES; may help you
    $ mysql --user=root --password=mysqlpassword
    Code:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 11
    Server version: 5.0.38-Ubuntu_0ubuntu1.1-log Ubuntu 7.04 
    distribution
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql> SHOW mysql LOG FILES;
    ERROR 1064 (42000): You have an error in your SQL 
    syntax; check the manual that corresponds to your MySQL
    server version for the right syntax to use near 'mysql LOG 
    FILES' at line 1
    Read "man mysql". The syntax is correct. I can't figure out how to correct it. Any advice? TIA.

    you may be able to find the location of the logfiewl fromt he startup config file for MySQL...... whihc I think is my.cnf and will be in the tree of the binaries or the etc trees. again it depends on your distribution and how you installed the server
    Here is
    $ cat /etc/mysql/my.cnf
    Code:
    #
    # The MySQL database server configuration file.
    #
    # You can copy this to one of:
    # - "/etc/mysql/my.cnf" to set global options,
    # - "~/.my.cnf" to set user-specific options.
    # 
    # One can use all long options that the program supports.
    # Run program with --help to get a list of available options and with
    # --print-defaults to see which it would actually understand and use.
    #
    # For explanations see
    # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
    
    # This will be passed to all mysql clients
    # It has been reported that passwords should be enclosed with ticks/quotes
    # escpecially if they contain "#" chars...
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    [client]
    port		= 3306
    socket		= /var/run/mysqld/mysqld.sock
    
    # Here is entries for some specific programs
    # The following values assume you have at least 32M ram
    
    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket		= /var/run/mysqld/mysqld.sock
    nice		= 0
    
    [mysqld]
    #
    # * Basic Settings
    #
    user		= mysql
    pid-file	= /var/run/mysqld/mysqld.pid
    socket		= /var/run/mysqld/mysqld.sock
    port		= 3306
    basedir		= /usr
    datadir		= /var/lib/mysql
    tmpdir		= /tmp
    language	= /usr/share/mysql/english
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address		= 127.0.0.1
    #
    # * Fine Tuning
    #
    key_buffer		= 16M
    max_allowed_packet	= 16M
    thread_stack		= 128K
    thread_cache_size	= 8
    #max_connections        = 100
    #table_cache            = 64
    #thread_concurrency     = 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit       = 1M
    query_cache_size        = 16M
    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    #log		= /var/log/mysql/mysql.log
    #
    # Error logging goes to syslog. This is a Debian improvement :)
    #
    # Here you can see queries with especially long duration
    #log_slow_queries	= /var/log/mysql/mysql-slow.log
    #long_query_time = 2
    #log-queries-not-using-indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    #server-id		= 1
    log_bin			= /var/log/mysql/mysql-bin.log
    # WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
    expire_logs_days	= 10
    max_binlog_size         = 100M
    #binlog_do_db		= include_database_name
    #binlog_ignore_db	= include_database_name
    #
    # * BerkeleyDB
    #
    # Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
    skip-bdb
    #
    # * InnoDB
    #
    # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
    # Read the manual for more InnoDB related options. There are many!
    # You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
    #skip-innodb
    #
    # * Security Features
    #
    # Read the manual, too, if you want chroot!
    # chroot = /var/lib/mysql/
    #
    # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
    #
    # ssl-ca=/etc/mysql/cacert.pem
    # ssl-cert=/etc/mysql/server-cert.pem
    # ssl-key=/etc/mysql/server-key.pem
    
    
    
    [mysqldump]
    quick
    quote-names
    max_allowed_packet	= 16M
    
    [mysql]
    #no-auto-rehash	# faster start of mysql but no tab completition
    
    [isamchk]
    key_buffer		= 16M
    
    #
    # * NDB Cluster
    #
    # See /usr/share/doc/mysql-server-*/README.Debian for more information.
    #
    # The following configuration is read by the NDB Data Nodes (ndbd processes)
    # not from the NDB Management Nodes (ndb_mgmd processes).
    #
    # [MYSQL_CLUSTER]
    # ndb-connectstring=127.0.0.1
    
    
    #
    # * IMPORTANT: Additional settings that can override those from this file!
    #
    !includedir /etc/mysql/conf.d/
    I haven't touched this file.


    I forget which command it is that does a disk trawl to find a file in MS DOS it would be dir \mysql.log /s for each and every mounted drive until you find it. but its a while since I've delved into the Linux command line. if you have a GUI file manager that should be able to find the file for you
    Whether you meant to install "webmin"?

    satimis

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so what "instance" of MySQL did you use for the show log files?

    ..as we are trying to find what the error is by finding the log file......
    I'm guessing its in /var/log/mysql/mysql.log

    I found it a pain to set up MySQL until I used the GUI MYSQL tools which were downloaded from the MySQL site

  7. #7
    Join Date
    Jun 2006
    Posts
    63
    Quote Originally Posted by healdem
    so what "instance" of MySQL did you use for the show log files?
    I was tring to find mysql log file.


    I found it on;
    # find / -name mysql.log
    Code:
    /var/log/mysql.log

    But it was an empty file.

    # cat /var/log/mysql.log
    No printout.


    I found it a pain to set up MySQL until I used the GUI MYSQL tools which were downloaded from the MySQL site
    Thanks for your link.


    B.R.
    satimis

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so on the face of it you have something very odd going on.. you have MySQL up and running but its not writing to its log file.

    Id try the GUI tools and see if you can actually access MySQL form those (MySQLAdmin first)

  9. #9
    Join Date
    Jun 2006
    Posts
    63
    Hi healdem,

    Just having clarified with the author of;
    http://www.howtoforge.com/perfect_setup_ubuntu704_p4

    which I'm following on this test.


    According to;
    # netstat -tap | grep mysql
    Code:
    tcp 0 0 localhost.localdo:mysql *:* LISTEN 6313/mysqld

    MySQL is listening on 127.0.0.1 only, I don't need following command;
    Code:
    # mysqladmin -h ubuntu.xyz.com root password myrootsqlpassword

    Anyway thanks for your assistance.


    B.R.
    satimis

Posting Permissions

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