我使用的是tar压缩文件格式的MySQL二进制分发版,但总是提示 error while loading shared libraries: libaio.so.1,我是按照使用手册的说法安装的,请问是什么问题?

解决方案 »

  1.   

    apt-get install libaio1
    然后再装。
      

  2.   

    安装成功了,启动时却出现The program 'mysql' can be found in the following packages:
     * mysql-client-5.1
     * mysql-client-5.0
    Try: apt-get install <selected package>
      

  3.   

    到mysql的bin目录下运行里面的mysql.
      

  4.   

    我就是在这个目录下运行的呀root@ubuntu:/usr/local/mysql/bin# mysql start
    The program 'mysql' can be found in the following packages:
     * mysql-client-5.1
     * mysql-client-5.0
    Try: apt-get install <selected package>
    mysql: command not found
      

  5.   

    如果在此目录下输入会这样root@ubuntu:/usr/local/mysql# bin/mysql start
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
      

  6.   


    直接mysql -u root啊
      

  7.   

    也是一样啊
    root@ubuntu:/usr/local/mysql/bin# mysql -u root
    The program 'mysql' can be found in the following packages:
     * mysql-client-5.1
     * mysql-client-5.0
    Try: apt-get install <selected package>
    mysql: command not found
    root@ubuntu:/usr/local/mysql/bin# cd /usr/local/mysql/
    root@ubuntu:/usr/local/mysql# bin/mysql -u root
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    root@ubuntu:/usr/local/mysql# 
      

  8.   

    apt-get install mysql-client-5.1
      

  9.   

    为啥要装客户端,server自己难道不能启动?
      

  10.   

    另外我查了一下,可以这样ln -s /var/lib/mysql/mysql.sock /var/run/mysqld/mysqld.sock
    不过我 /var/lib/mysql/文件夹下却没有mysql.sock
    root@ubuntu:/var/lib/mysql# ls
    ibdata1  ib_logfile0  ib_logfile1  mysql  performance_schema  test  ubuntu.err
      

  11.   

    mysql这个命令是客户端程序,不是服务器端程序。
    服务器启动的进程是mysqld.
      

  12.   

    你装完mysql以后
    service mysql start | stop
    就可以启动mysql了。最好看看mysql的官方手册,了解一下linux下边mysql的基本使用。
      

  13.   

    这个也试过了
    root@ubuntu:/usr/bin# service mysql start
    mysql: unrecognized service
      

  14.   

    root@ubuntu:/usr/local/mysql# /usr/local/mysql/bin/mysqld_safe --user=mysql &
    [1] 3219
    root@ubuntu:/usr/local/mysql# 110105 21:59:12 mysqld_safe Logging to '/var/lib/mysql/ubuntu.err'.
    110105 21:59:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    110105 21:59:15 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    我用mysqld_safe启动,2秒后就ended了
      

  15.   

    er
    g++  -o"TestCpp"  ./src/TestCpp.o   
    Finished building target: TestCpp
      

  16.   

    110105 21:59:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    110105 21:59:13 [ERROR] Can't find messagefile '/usr/share/errmsg.sys'
    110105 21:59:13 [Note] Plugin 'FEDERATED' is disabled.
    InnoDB: The InnoDB memory heap is disabled
    InnoDB: Mutexes and rw_locks use InnoDB's own implementation
    InnoDB: Compressed tables use zlib 1.2.3
    110105 21:59:13  InnoDB: Using Linux native AIO
    110105 21:59:13  InnoDB: Initializing buffer pool, size = 128.0M
    110105 21:59:13  InnoDB: Completed initialization of buffer pool
    110105 21:59:13  InnoDB: highest supported file format is Barracuda.
    110105 21:59:14  InnoDB: 1.1.4 started; log sequence number 1595675
    110105 21:59:14 [ERROR] Aborting110105 21:59:14  InnoDB: Starting shutdown...
    110105 21:59:15  InnoDB: Shutdown completed; log sequence number 1595675
    110105 21:59:15 [Note] 
    110105 21:59:15 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
      

  17.   

    楼主针对[ERROR] Can't find messagefile '/usr/share/errmsg.sys' 这个错误解决.http://www.baidu.com/s?wd=[ERROR]+Can't+find+messagefile+'/usr/share/errmsg.sys'&n=2