Skip to content

Instantly share code, notes, and snippets.

@scheibo
Created January 14, 2011 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scheibo/779972 to your computer and use it in GitHub Desktop.
Save scheibo/779972 to your computer and use it in GitHub Desktop.
typescript from mysql error on Ubuntu
Script started on Fri 14 Jan 2011 05:51:00 PM UTC
root@scheibo# vim dpkg -l | grep mysql
ii libdbd-mysql-perl 4.011-1ubuntu1 A Perl5 database interface to the MySQL data
ii libmysqlclient16 5.1.37-1ubuntu5.5 MySQL database client library
ii mysql-client 5.1.37-1ubuntu5.5 MySQL database client (metapackage depending
ii mysql-client-5.1 5.1.37-1ubuntu5.5 MySQL database client binaries
ii mysql-common 5.1.37-1ubuntu5.5 MySQL database common files (e.g. /etc/mysql
iU mysql-server 5.1.37-1ubuntu5.5 MySQL database server (metapackage depending
iF mysql-server-5.1 5.1.37-1ubuntu5.5 MySQL database server binaries
ii mysql-server-core-5.1 5.1.37-1ubuntu5.5 MySQL database core server files
root@scheibo# apt-get purge mysql-client mysql-client-5.1 mysql-common mysql-server mysql-server-5.1 mysql-server-core-5.1
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 31%
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree
Reading state information... 0%
Reading state information... 1%
Reading state information... Done
The following packages were automatically installed and are no longer required:
libnet-daemon-perl libdbi-perl libhtml-template-perl libplrpc-perl
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
libdbd-mysql-perl* libmysqlclient16* mysql-client* mysql-client-5.1* mysql-common* mysql-server* mysql-server-5.1* mysql-server-core-5.1*
0 upgraded, 0 newly installed, 8 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 56.7MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 22866 files and directories currently installed.)
Removing mysql-server ...
Removing mysql-server-5.1 ...
* Stopping MySQL database server mysqld
[ OK ]
Purging configuration files for mysql-server-5.1 ...
Removing mysql-client ...
Removing mysql-client-5.1 ...
Purging configuration files for mysql-client-5.1 ...
Removing libdbd-mysql-perl ...
Removing mysql-server-core-5.1 ...
Removing libmysqlclient16 ...
Purging configuration files for libmysqlclient16 ...
Removing mysql-common ...
Purging configuration files for mysql-common ...
dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
root@scheibo# rm -r /etc/mysql/
root@scheibo# apt-get autoremove
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 32%
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree
Reading state information... 0%
Reading state information... 1%
Reading state information... Done
The following packages will be REMOVED:
libdbi-perl libhtml-template-perl libnet-daemon-perl libplrpc-perl
0 upgraded, 0 newly installed, 4 to remove and 1 not upgraded.
After this operation, 2,699kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 22586 files and directories currently installed.)
Removing libdbi-perl ...
Removing libhtml-template-perl ...
Removing libplrpc-perl ...
Removing libnet-daemon-perl ...
root@scheibo# apt-get autoclean
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 32%
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree
Reading state information... 0%
Reading state information... 1%
Reading state information... Done
root@scheibo# apt-get autoremove
rm -r /etc/mysql/
apt-get purge mysql-client mysql-client-5.1 mysql-common mysql-server mysql-server-5.1 mysql-server-core-5.1
dpkg -l | grep mysql
root@scheibo# apt-get instal mysql-common mysql-client mysql-server
E: Invalid operation instal
root@scheibo# apt-get install
Reading package lists... 0%
Reading package lists... 100%
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree
Reading state information... 0%
Reading state information... 1%
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-server-5.1 mysql-server-core-5.1
Suggested packages:
dbishell libipc-sharedcache-perl tinyca mailx
The following NEW packages will be installed:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client mysql-client-5.1 mysql-common mysql-server mysql-server-5.1 mysql-server-core-5.1
0 upgraded, 12 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/23.5MB of archives.
After this operation, 59.4MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Package configuration┌─────────────────────────────────────────┤ Configuring mysql-server-5.1 ├─────────────────────────────────────────┐│ While not mandatory, it is highly recommended that you set a password for the MySQL administrative "root" user. │ │ │ │ If this field is left blank, the password will not be changed. │ │ │ │ New password for the MySQL "root" user: │ │ │ │ ________________________________________________________________________________________________________________ │ │ │ │ <Ok> │ │ │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ******************
Package configuration┌──────┤ Configuring mysql-server-5.1 ├───────┐│ │ │ │ │ Repeat password for the MySQL "root" user: │ │ │ │ ___________________________________________ │ │ │ │ <Ok> │ │ │ └─────────────────────────────────────────────┘ ******************
Selecting previously deselected package mysql-common.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 22408 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.1.37-1ubuntu5.5_all.deb) ...
Selecting previously deselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.43-1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.609-1_amd64.deb) ...
Selecting previously deselected package libmysqlclient16.
Unpacking libmysqlclient16 (from .../libmysqlclient16_5.1.37-1ubuntu5.5_amd64.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.011-1ubuntu1_amd64.deb) ...
Selecting previously deselected package mysql-client-5.1.
Unpacking mysql-client-5.1 (from .../mysql-client-5.1_5.1.37-1ubuntu5.5_amd64.deb) ...
Selecting previously deselected package mysql-server-core-5.1.
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.37-1ubuntu5.5_amd64.deb) ...
Setting up mysql-common (5.1.37-1ubuntu5.5) ...
Selecting previously deselected package mysql-server-5.1.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 22765 files and directories currently installed.)
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.37-1ubuntu5.5_amd64.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-1_all.deb) ...
Selecting previously deselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_5.1.37-1ubuntu5.5_all.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.37-1ubuntu5.5_all.deb) ...
Setting up libnet-daemon-perl (0.43-1) ...
Setting up libplrpc-perl (0.2020-2) ...
Setting up libdbi-perl (1.609-1) ...
Setting up libmysqlclient16 (5.1.37-1ubuntu5.5) ...
Setting up libdbd-mysql-perl (4.011-1ubuntu1) ...
Setting up mysql-client-5.1 (5.1.37-1ubuntu5.5) ...
Setting up mysql-server-core-5.1 (5.1.37-1ubuntu5.5) ...
Setting up mysql-server-5.1 (5.1.37-1ubuntu5.5) ...
* Stopping MySQL database server mysqld
[ OK ]
110114 17:55:52 [Note] Plugin 'FEDERATED' is disabled.
110114 17:55:54 InnoDB: Started; log sequence number 0 44243
ERROR: 1146 Table 'mysql.user' doesn't exist
110114 17:55:54 [ERROR] Aborting
110114 17:55:54 InnoDB: Starting shutdown...
110114 17:55:57 InnoDB: Shutdown completed; log sequence number 0 44243
110114 17:55:57 [Warning] Forcing shutdown of 1 plugins
110114 17:55:57 [Note] /usr/sbin/mysqld: Shutdown complete
Package configuration┌─────────────────────────────────────────────────────────────────────────────────────────┤ Configuring mysql-server-5.1 ├─────────────────────────────────────────────────────────────────────────────────────────┐│ │ │ 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.1/README.Debian file for more information. │ │ │ │ <Ok> │ │ │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
* Starting MySQL database server mysqld
[fail]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libhtml-template-perl (2.9-1) ...
Setting up mysql-client (5.1.37-1ubuntu5.5) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.1; however:
Package mysql-server-5.1 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
No apport report written because the error message indicates its a followup error from a previous failure.
ldconfig deferred processing now taking place
Errors were encountered while processing:
mysql-server-5.1
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@scheibo# uname -a
Linux scheibo.xen.prgmr.com 2.6.31-16-server #53-Ubuntu SMP Tue Dec 8 05:08:02 UTC 2009 x86_64 GNU/Linux
root@scheibo# ls -l /var/run/mysqld/
total 0
root@scheibo# ls -l /var/run/
total 20
drwxr-xr-x 2 root root 80 2011-01-14 17:04 fail2ban
-rw-r--r-- 1 root root 175 2011-01-14 17:04 motd
drwxr-xr-x 2 mysql root 40 2011-01-14 17:56 mysqld
drwxr-xr-x 2 root root 60 2011-01-14 17:03 network
drwxr-xr-x 2 syslog syslog 60 2011-01-14 17:03 rsyslog
-rw-r--r-- 1 root root 4 2011-01-14 17:03 rsyslogd.pid
drwxr-xr-x 2 root root 40 2011-01-14 17:03 sshd
-rw-r--r-- 1 root root 4 2011-01-14 17:03 sshd.pid
drwx------ 3 root kjs 60 2011-01-14 17:06 sudo
-rw-r--r-- 1 root root 4 2011-01-14 17:03 upstart-udev-bridge.pid
-rw-rw-r-- 1 root utmp 1536 2011-01-14 17:37 utmp
root@scheibo# ls -l /var/lib/mysql/
total 20528
-rw------- 1 mysql mysql 0 2011-01-14 17:55 debian-5.1.flag
-rw--w---- 1 mysql mysql 10485760 2011-01-14 17:56 ibdata1
-rw--w---- 1 mysql mysql 5242880 2011-01-14 17:56 ib_logfile0
-rw--w---- 1 mysql mysql 5242880 2010-03-21 20:08 ib_logfile1
drwxrwxrwx 2 mysql mysql 4096 2011-01-14 17:56 mysql
-rw------- 1 mysql mysql 6 2010-03-21 20:08 mysql_upgrade_info
root@scheibo# ls -l /var/lib/mysql/mysql
total 0
root@scheibo# cat /etc/mysql/my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
#
# * IMPORTANT
# If you make changes to these settings and your system uses apparmor, you may
# also need to also adjust /etc/apparmor.d/usr.sbin.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
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
root@scheibo# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 12G 4.1G 6.7G 38% /
udev 261M 124K 261M 1% /dev
none 261M 0 261M 0% /dev/shm
none 261M 28K 261M 1% /var/run
none 261M 0 261M 0% /var/lock
none 261M 0 261M 0% /lib/init/rw
root@scheibo# exit
exit
Script done on Fri 14 Jan 2011 05:58:45 PM UTC
root@scheibo# logout
kjs@scheibo$ sudo mysqld
[sudo] password for kjs:
110114 18:10:25 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
110114 18:10:25 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110114 18:10:26 InnoDB: Started; log sequence number 0 44243
110114 18:10:26 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
kjs@scheibo$ sudo /etc/init.d/mysql start
* Starting MySQL database server mysqld
...fail!
kjs@scheibo$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment