/usr/share/doc/mysql-server-5.0/README.Debianを読めと。
/usr/bin/mysqladmin: connect to server at 'localhost' failed error: †hoge@hogeserver:/var/lib$ sudo /etc/init.d/mysql start Starting MySQL database server: mysqld. Checking for corrupt, not cleanly closed and upgrade needing tables.. /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)' パスワードを変更する。 Stopping MySQL database server: mysqld failed! †不整合が起こっている時に出るらしい。 [解決]ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES †mysql> grant replication slave on hogedb.* to username@"IP/Mask" identified by 'password'; 最初のエラー、で上記でも怒られた。多分 mysql> grant replication slave on *.* to username@"IP/Mask" identified by 'password'; こうすればエラーは出ないんだろうけど、どうしてかもうちょっと調べる必要がある。
[解決]ERROR 1144 (42000): Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used †MySQLで特定のDBの特定のテーブルに対してreplicationを行う為のアカウントを追加しようと思ったらこんな感じで怒られた。解決策 mysql> grant replication slave on hogedb.hogetable to username@"IP/Mask" identified by 'password'; ERROR 1144 (42000): Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used
[解決]The PDO extension is required for this adapter but the extension is not loaded †pecl install pdo pdo_mysql をしたのに、こんなのが出た。なので、まずphpinfo()をすると /etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/zpdo_mysql.ini と書いてある。/etc/php5/apache2/php.iniを見ると、./conf.dの下にあるのも読み込むようになっている。まさにApache2と同じようなdebianちっくな構成になっている。 PDOインストールしたのにエラーが出て使えないのは困ったな、と思って調べてみたら、こんな事が書いてあって、
[解決] undefined symbol: php_pdo_get_dbh_ce †/var/log/apache2/error.logに出ている。 /usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613+lfs/pdo_mysql.so: undefined symbol: php_pdo_get_dbh_ce [解決]ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) †mysql-clientはいれたのに、mysql-serverをいれてなかった。ozn aptitude install mysql-server mysql-client †The following NEW packages will be automatically installed: mysql-client-5.0 mysql-server-5.0 The following packages have been kept back: fontconfig libfontconfig1 libgd2-xpm php4-pear The following NEW packages will be installed: mysql-client-5.0 mysql-server-5.0 The following packages will be upgraded: mysql-client mysql-server /usr/sbin/mysqld: unknown variable 'expire_logs_days=10' †/var/log/syslogに出ていたエラー。何だろうと調べてみたら、/etc/mysql/my.cnfにあった。 # WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian! expire_logs_days = 10 でREADME.Debianはどこにあるか、というと/usr/share/doc/mysql-serverにある aptitude install mysqlにしたら保留がたくさん出た †apache2 apache2-mpm-prefork apache2-utils fontconfig libapache2-mod-php4 libdbd-mysql-perl libfontconfig1 libgd2-xpm mysql-client mysql-server php4 php4-cli php4-common php4-gd php4-mysql php4-pear で、よくよく調べてみるとetchなのに、apache2がsargeのままだった。これは変えないと。 The following NEW packages will be automatically installed: apache2.2-common libapr1 libaprutil1 libmysqlclient15off libpq4 libsqlite3-0 The following packages will be automatically REMOVED: apache2-common The following packages have been kept back: fontconfig libdbd-mysql-perl libfontconfig1 libgd2-xpm mysql-client mysql-server php4 php4-pear The following NEW packages will be installed: apache2.2-common libapr1 libaprutil1 libmysqlclient15off libpq4 libsqlite3-0 The following packages will be REMOVED: apache2-common The following packages will be upgraded: apache2 apache2-mpm-prefork apache2-utils libapache2-mod-php4 php4-cli php4-common php4-gd php4-mysql 8 packages upgraded, 6 newly installed, 1 to remove and 8 not upgraded. Need to get 7644kB of archives. After unpacking 5886kB will be used. Do you want to continue? [Y/n/?] y ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) †a@comuro:~$ sudo /etc/init.d/mysql start Password: Starting MySQL database server: mysqld...failed. Please take a look at the syslog. /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! 解決方法として
http://dev.mysql.com/doc/refman/4.1/ja/can-not-connect-to-server.html Dec 18 17:26:11 localhost mysqld_safe[31765]: started Dec 18 17:26:11 localhost mysqld[31769]: 071218 17:26:11 /usr/sbin/mysqld: unknown variable 'expire_logs_days=10' Dec 18 17:26:11 localhost mysqld[31769]: Dec 18 17:26:11 localhost mysqld_safe[31771]: ended Dec 18 17:26:17 localhost /etc/init.d/mysql[31834]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Dec 18 17:26:17 localhost /etc/init.d/mysql[31834]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed Dec 18 17:26:17 localhost /etc/init.d/mysql[31834]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Dec 18 17:26:17 localhost /etc/init.d/mysql[31834]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Dec 18 17:26:17 localhost /etc/init.d/mysql[31834]: |