# Preconfiguration setupshell> groupadd mysql
shell> useradd -g mysql mysql
# Beginning of source-build specific instructionsshell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
# End of source-build specific instructions# Postinstallation setupshell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
# Next command is optionalshell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optionalshell> cp support-files/mysql.server /etc/init.d/mysql.server
# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake . -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/opt/mysql-5.5.55/data/ \
-DCMAKE_INSTALL_PREFIX=/opt/mysql-5.5.55 -DINSTALL_LAYOUT=STANDALONE -DENABLED_PROFILING=ON \
-DMYSQL_MAINTAINER_MODE=OFF -DWITH_DEBUG=OFF \
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=TRUE -DWITH_ZLIB=bundled \
-DWITH_EXTRA_CHARSETS=all
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /opt/mysql-5.5.55
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server
# use service
shell> service mysql.server status 或 start 或 stop
# Preconfiguration setupshell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
# Beginning of source-build specific instructionsshell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake . -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/opt/mysql/mysql-5.7.18/data/ \
-DCMAKE_INSTALL_PREFIX=/opt/mysql/mysql-5.7.18 -DINSTALL_LAYOUT=STANDALONE -DENABLED_PROFILING=ON \
-DMYSQL_MAINTAINER_MODE=OFF -DWITH_DEBUG=OFF \
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=TRUE -DWITH_ZLIB=bundled \
-DWITH_BOOST=boost/boost_1_59_0/ \
-DWITH_EXTRA_CHARSETS=all
shell> make
shell> make install
# End of source-build specific instructions# Postinstallation setupshell> cd /opt/mysql/mysql-5.7.18
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
shell> ./bin/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql --basedir=/var/lib/mysql
shell> chown -R mysql data
# Next command is optionalshell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optionalshell> cp support-files/mysql.server /etc/init.d/mysql.server
# use serviceshell> service mysql.server status 或 start 或 stop
[mysql-x.x.x]# libtoolize --force
Using `AC_PROG_RANLIB' is rendered obsolete by `AC_PROG_LIBTOOL'
You should update your `aclocal.m4' by running aclocal.
[mysql-x.x.x]# aclocal
[mysql-x.x.x]# cp BUILD/compile-pentium64 ./compile
[mysql-x.x.x]# autoreconf
php 报错 ,Error Message: 2002 - Can’t connect to local MySQL server through socket
报错
1
2
Connect to database testlink on Host localhost fails
DBMS Error Message: 2002 - Can't connect to local MySQL server through socket '/var/lib/mysql-5.1.72/mysql.sock' (13)
1
Connect Error(2002) Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1
2
3
yii framework 报错
CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Thu Nov 24 21:05:49 2016] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips SVN/1.8.13 configured -- resuming normal operations
[Thu Nov 24 21:05:57 2016] [error] [client 192.168.247.231] PHP Fatal error: Call to undefined function mysql_connect() in /opt/server/testlink/testlink.1.9.5/testlink
/testlink-1.9.5/third_party/adodb/drivers/adodb-mysql.inc.php on line 364
[Thu Nov 24 21:06:03 2016] [error] [client 192.168.247.231] PHP Fatal error: Call to undefined function mysql_connect() in /opt/server/testlink/testlink.1.9.5/testlink
/testlink-1.9.5/third_party/adodb/drivers/adodb-mysql.inc.php on line 364, referer: http://192.168.251.72/testlink/
[Thu Nov 24 21:06:09 2016] [error] [client 192.168.247.231] PHP Fatal error: Call to undefined function mysql_connect() in /opt/server/testlink/testlink.1.9.5/testlink
/testlink-1.9.5/third_party/adodb/drivers/adodb-mysql.inc.php on line 364, referer: http://192.168.251.72/testlink/
[Thu Nov 24 21:07:00 2016] [error] [client 192.168.247.231] PHP Fatal error: Call to undefined function mysql_connect() in /opt/server/testlink/testlink.1.9.5/testlink
/testlink-1.9.5/third_party/adodb/drivers/adodb-mysql.inc.php on line 364
[Thu Nov 24 21:07:02 2016] [error] [client 192.168.247.231] PHP Fatal error: Call to undefined function mysql_connect() in /opt/server/testlink/testlink.1.9.5/testlink
/testlink-1.9.5/third_party/adodb/drivers/adodb-mysql.inc.php on line 364
[Thu Nov 24 21:09:32 2016] [error] [client 192.168.247.231] Directory index forbidden by Options directive: /opt/server/wiphone/wiphone/php_source/
[Thu Nov 24 21:09:37 2016] [error] [client 192.168.247.231] Directory index forbidden by Options directive: /opt/server/wiphone/wiphone/php_source/