Yepyeni bir Kubuntu 14.04 kurulumunda koştum sudo aptitude install mysql-server-core-5.6
. Yükleme, değiştirilecek olan bazı KDE paketlerinin bağımlılıkları nedeniyle tamamlanamadı mysql-server-core-5.5
. Şimdi çalıştırdığımda sudo aptitude install mysql-server-5.5
bir şifre belirledikten sonra bu hatayı alıyorum:
Configuring mysql-server-5.5
Unable to set password for the MySQL "root" user
An error occurred while setting the password for the MySQL administrative user. This may have happened
because the account already has a password, or because of a communication problem with the MySQL server.
You should check the account's password after the package installation.
Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more information.
Aslında okudum /usr/share/doc/mysql-server-5.5/README.Debian
ama durumumla ilgili hiçbir şey yoktu. MySQL günlüğü yardımcı olur:
$ tail /var/log/mysql/error.log
140818 10:17:16 InnoDB: Completed initialization of buffer pool
140818 10:17:16 InnoDB: highest supported file format is Barracuda.
140818 10:17:16 InnoDB: Waiting for the background threads to start
140818 10:17:17 InnoDB: 5.5.38 started; log sequence number 1595675
140818 10:17:17 [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp'
140818 10:17:17 [ERROR] Aborting
140818 10:17:17 InnoDB: Starting shutdown...
140818 10:17:18 InnoDB: Shutdown completed; log sequence number 1595675
140818 10:17:18 [Note]
Ancak --explicit_defaults_for_timestamp
seçeneğin hangi komut dosyasında ayarlandığını bulamıyorum . Ben başlatmaya çalışması mysql
olmadan service
önlemek için --explicit_defaults_for_timestamp
seçenek ama yine de başlamaz:
$ ps aux | grep mysql
dotanco+ 25458 0.0 0.0 11748 928 pts/4 S+ 10:30 0:00 grep --color=auto mysql
$ sudo mysqld_safe --skip-grant-tables &
[1] 25470
140818 10:30:54 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
140818 10:30:54 mysqld_safe Logging to '/var/log/mysql/error.log'.
140818 10:30:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140818 10:30:57 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[1]+ Done sudo mysqld_safe --skip-grant-tables
$ ps aux | grep mysql
dotanco+ 25810 0.0 0.0 11748 932 pts/4 S+ 10:31 0:00 grep --color=auto mysql
Hata bana söyler Remove all --log-error configuration options
. Bu nedenle /etc/mysql/my.cnf
aşağıdaki satırı düzenledim ve yorum yaptım :
log-error = /var/log/mysql/error.log
Şimdi hata alıyorum ama yine de giriş yapamıyorum:
$ sudo mysqld_safe --skip-grant-tables &
[1] 26558
140818 10:34:37 mysqld_safe Logging to syslog.
140818 10:34:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140818 10:34:40 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[1]+ Done sudo mysqld_safe --skip-grant-tables
$ mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Sorun ne olabilir? Nasıl ilerlemeliyim?
DÜZENLE
Şimdi explicit-defaults-for-timestamp
satırın yorumunu yaptım my.cnf
. Tüm dosya, eksi başlık yorumları:
$ cat /etc/mysql/my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
#explicit_defaults_for_timestamp
bind-address = 127.0.0.1
#log-error = /var/log/mysql/error.log
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
symbolic-links=0
!includedir /etc/mysql/conf.d/
MySQL'i çalıştırmayı denediğimde olan budur:
$ sudo echo 1 >> /var/log/mysql/error.log
$ tail /var/log/mysql/error.log
140818 10:31:49 InnoDB: Waiting for the background threads to start
140818 10:31:50 InnoDB: 5.5.38 started; log sequence number 1595675
140818 10:31:50 [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp'
140818 10:31:50 [ERROR] Aborting
140818 10:31:50 InnoDB: Starting shutdown...
140818 10:31:51 InnoDB: Shutdown completed; log sequence number 1595675
140818 10:31:51 [Note]
140818 10:31:51 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
1
$ sudo service mysql start
start: Job failed to start
$ tail /var/log/mysql/error.log
140818 10:31:49 InnoDB: Waiting for the background threads to start
140818 10:31:50 InnoDB: 5.5.38 started; log sequence number 1595675
140818 10:31:50 [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp'
140818 10:31:50 [ERROR] Aborting
140818 10:31:50 InnoDB: Starting shutdown...
140818 10:31:51 InnoDB: Shutdown completed; log sequence number 1595675
140818 10:31:51 [Note]
140818 10:31:51 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
1
$ grep explicit_defaults_for_timestamp /etc/mysql/my.cnf /etc/init.d/mysql /etc/default/mysql
/etc/mysql/my.cnf:#explicit_defaults_for_timestamp
grep: /etc/default/mysql: No such file or directory
Görülebileceği gibi, günlüklere yeni bir şey yazılmaz ve explicit_defaults_for_timestamp
seçenek hiçbir yere ayarlanmaz.
Yeniden yükleyebildim mysql-server-core-5.5
ama bu sorunu çözmedi:
$ sudo aptitude reinstall mysql-server-core-5.5
The following packages will be REINSTALLED:
mysql-server-core-5.5
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 3,213 kB of archives. After unpacking 0 B will be used.
Get: 1 http://il.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-server-core-5.5 amd64 5.5.38-0ubuntu0.14.04.1 [3,213 kB]
Fetched 3,213 kB in 1s (3,163 kB/s)
(Reading database ... 217167 files and directories currently installed.)
Preparing to unpack .../mysql-server-core-5.5_5.5.38-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-core-5.5 (5.5.38-0ubuntu0.14.04.1) over (5.5.38-0ubuntu0.14.04.1) ...
Replaced by files in installed package mysql-common (5.6.20-1ubuntu14.04) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up mysql-server-core-5.5 (5.5.38-0ubuntu0.14.04.1) ...
$ sudo service mysql status
mysql stop/waiting
$ sudo service mysql start
start: Job failed to start
$ tail /var/log/mysql/error.log
140818 10:31:49 InnoDB: Waiting for the background threads to start
140818 10:31:50 InnoDB: 5.5.38 started; log sequence number 1595675
140818 10:31:50 [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp'
140818 10:31:50 [ERROR] Aborting
140818 10:31:50 InnoDB: Starting shutdown...
140818 10:31:51 InnoDB: Shutdown completed; log sequence number 1595675
140818 10:31:51 [Note]
140818 10:31:51 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
1
Bu 1
günlüğün son satırında ile daha önce eklenmiş echo
ve yeni log eklendi hiçbir şeyin gösterir.
timestamp
sadece içinde bulundu etc/mysql/my.cnf
ve ben dışarı çıkardı. Yine de, yine de aynı şeyi günlükte alıyorum.