我是编译安装的,安装参数如下:
./configure --prefix=/usr/local/mysql --with-extra-charsets=all --enable-thread-safe-client --enable-assembler --with-charset=utf8 --enable-thread-safe-client --with-extra-charsets=all --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile启动时出错提示:
Starting MySQL.Manager of pid-file quit without updating file. failed!我查看日志错误记录:
110122 10:11:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
110122 10:11:10 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110122 10:11:10 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-bdb'
110122 10:11:10 [ERROR] Aborting

解决方案 »

  1.   

    楼主的权限和mysql用户都设置了吗?
      

  2.   

    检查你的my.cnf 文件内容,估计DATADIR没设置正确或者没有权限。
      

  3.   

    安装的大致流程是主要的:
      groupadd mysql //建立mysql用户组
      useradd -g mysql mysql //建立mysql帐户
      tar -zxvf mysql-x.x.xx.tar.gz //解压缩mysql
      cd mysql-5.0.45 //进入解压好的mysql目录
      ./configure –prefix=/usr/local/mysql –with-charset=utf8 –with-collation=utf8_general_ci –with-extra-charsets=latin1 //设置参数
      make
      make install //开始安装
      cp support-files/my-medium.cnf /etc/my.cnf //拷贝my-medium.cnf文件到/etc/目录下并重命名为my.cnf
      cd /usr/local/mysql //进入mysql目录
      bin/mysql_install_db --user=mysql
      chown -R root . //设置目录权限属性
      chown -R mysql /usr/local/mysql/var
      chgrp -R mysql
      bin/mysqld_safe --user=mysql & //启动mysql
      用编辑器打开/etc/rc.local文件,在exit 0前面加上,/usr/local/mysql/bin/mysqld_safe –user=mysql &
      重新启动,输入mysql,如果能进入则说明启动成功!
      

  4.   


    谢谢,我是按别人的教程来安装的。刚才又重新安装一遍,才发现到这步有问题了。
    输入命令:/usr/local/mysql/bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql返回错误:Installing MySQL system tables...
    110122 11:40:58 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-bdb'
    110122 11:40:58 [ERROR] Aborting110122 11:40:58 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete
    Installation of system tables failed!  Examine the logs in
    /var/lib/mysql for more information.You can try to start the mysqld daemon with:    shell> /usr/local/mysql/libexec/mysqld --skip-grant &and use the command line tool /usr/local/mysql/bin/mysql
    to connect to the mysql database and look at the grant tables:    shell> /usr/local/mysql/bin/mysql -u root mysql
        mysql> show tablesTry 'mysqld --help' if you have problems with paths.  Using --log
    gives you a log in /var/lib/mysql that may be helpful.Please consult the MySQL manual section
    'Problems running mysql_install_db', and the manual section that
    describes problems on your OS.  Another information source are the
    MySQL email archives available at http://lists.mysql.com/.Please check all of the above before mailing us!  And remember, if
    you do mail us, you MUST use the /usr/local/mysql/scripts/mysqlbug script!
      

  5.   

    楼主的my.cnf的记录是怎么样的;贴出你的my.cnf的信息;
    或则楼主手动指定mysql用你的my.cnf
    如:
    /usr/bin/safe_mysqld   --defaults-file=/etc/my.cnf
      

  6.   


    加了你那句,似乎不行。我的my.cnf文件如下:
    # Example MySQL config file for small systems.
    #
    # This is for a system with little memory (<= 64M) where MySQL is only used
    # from time to time and it's important that the mysqld daemon
    # doesn't use much resources.
    #
    # You can copy this file to
    # /etc/my.cnf to set global options,
    # mysql-data-dir/my.cnf to set server-specific options (in this
    # installation this directory is /usr/local/mysql/var) or
    # ~/.my.cnf to set user-specific options.
    #
    # In this file, you can use all long options that a program supports.
    # If you want to know which options a program supports, run the program
    # with the "--help" option.# The following options will be passed to all MySQL clients
    [client]
    #password = your_password
    port = 3306
    socket = /tmp/mysql.sock# Here follows entries for some specific programs# The MySQL server
    [mysqld]
    port = 3306
    socket = /tmp/mysql.sock
    skip-external-locking
    key_buffer_size = 16K
    max_allowed_packet = 1M
    table_open_cache = 4
    sort_buffer_size = 64K
    read_buffer_size = 256K
    read_rnd_buffer_size = 256K
    net_buffer_length = 2K
    thread_stack = 128K# Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (using the "enable-named-pipe" option) will render mysqld useless!

    #skip-networking
    server-id = 1# Uncomment the following if you want to log updates
    #log-bin=mysql-bin# binary logging format - mixed recommended
    #binlog_format=mixed# Uncomment the following if you are using InnoDB tables
    #innodb_data_home_dir = /usr/local/mysql/var/
    #innodb_data_file_path = ibdata1:10M:autoextend
    #innodb_log_group_home_dir = /usr/local/mysql/var/
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    #innodb_buffer_pool_size = 16M
    #innodb_additional_mem_pool_size = 2M
    # Set .._log_file_size to 25 % of buffer pool size
    #innodb_log_file_size = 5M
    #innodb_log_buffer_size = 8M
    #innodb_flush_log_at_trx_commit = 1
    #innodb_lock_wait_timeout = 50[mysqldump]
    quick
    max_allowed_packet = 16M[mysql]
    no-auto-rehash
    # Remove the next comment character if you are not familiar with SQL
    #safe-updates[myisamchk]
    key_buffer_size = 8M
    sort_buffer_size = 8M[mysqlhotcopy]
    interactive-timeout
      

  7.   

    配置文件没什么问题;
    /usr/local/mysql/bin/mysql_install_db --user=mysql 楼主这样试下。
    楼主看下/etc/mysql/下面是否有my.cnf文件,有的话重命名一下;确保mysql 启用你刚才发的my。cnf文件
      

  8.   


    /etc/mysql/my.cnf文件已经重命名了我试下你给的命令啊server:~# /usr/local/mysql/bin/mysql_install_db --user=mysqlFATAL ERROR: Could not find mysqldThe following directories were searched:    /usr/libexec
        /usr/sbin
        /usr/binIf you compiled from source, you need to run 'make install' to
    copy the software into the correct location ready for operation.If you are using a binary release, you must either be at the top
    level of the extracted archive, or pass the --basedir option
    pointing to that location.
      

  9.   

    我这样就解决了。谢谢上面的兄弟/usr/local/mysql/bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql