虚拟机上的cent0s6.2,安装mariadb5.5.20,按照以下步骤安装:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
最后一步报错:
[root@localhost mariadb-5.5.20-linux-x86_64]# bin/mysqld_safe --user=mysql &
[1] 3074
[root@localhost mariadb-5.5.20-linux-x86_64]# 170406 05:10:57 mysqld_safe Logging to '/usr/local/mariadb-5.5.20-linux-x86_64/data/localhost.localdomain.err'.
170406 05:10:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mariadb-5.5.20-linux-x86_64/data
170406 05:11:00 mysqld_safe mysqld from pid file /usr/local/mariadb-5.5.20-linux-x86_64/data/localhost.localdomain.pid ended[1]+  Done                    bin/mysqld_safe --user=mysql
求助,这个百度了好长时间,没找到合适的解决方法。

解决方案 »

  1.   

    看下'/usr/local/mariadb-5.5.20-linux-x86_64/data/localhost.localdomain.err
      

  2.   

    下面是它后面的内容:
    170406 11:03:00 [ERROR] Can't start server : Bind on unix socket: No such file or directory
    170406 11:03:00 [ERROR] Do you already have another mysqld server running on socket: /usr/local/mariadb/mysql.sock ?
    170406 11:03:00 [ERROR] Aborting170406 11:03:00  InnoDB: Starting shutdown...
    170406 11:03:00  InnoDB: Shutdown completed; log sequence number 1597945
    170406 11:03:00 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete170406 11:03:01 mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.localdomain.pid ended
      

  3.   

    看一下有没有 /usr/local/mariadb/ 这个目录。
    估计是没有这个目录,unix socket监听的sock文件创建不起来