- 论坛徽章:
- 0
|
linux下无法访问mysql,
能在终端进入mysql,可是mysql_connect("localhost","root","");提示无法进入socket'/var/lib/mysql.sock'
怎么办啊!!!!!
高手吧qq留下
安装mysql安装命令如下:
1--tar zxvf .......
2--mv mysql..... /usr/local/mysql
3--groupadd mysql
4--useradd -d /usr/local/mysql/data -s /sbin/nologin -g mysql mysql
5--cd /usr/local/mysql
6--chown -R root .
7--chown -Rmysql data
8--chgrp -R mysql .
9--./scripts/mysql_install_db --user=mysql
10--./binmysqld_safe ---user=mysql &
11--cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
12--chomd 700 /etc/rc.d/init.d/mysqld
13--chkconfig --add mysqld
php编译代码:
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs
--with-mysql-dir=/usr/local/mysql
--with-xml=/usr/local/libxml2
--with-png=/usr/local/lib
--with-jpeg-dir=/usr/local/jpeg6
--with-zlib=/usr/local/zilb
--with-freetype=/usr/local/freetype
--with-gd=/usr/local/gd
--with-mysql=/usr/local/mysql/bin/mysql_config
--enable-track-vars
--enable-soap
--enable-mbstring=all |
|