vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi I was having some configuration problems with mysql. So I apt-get remove'd it and to make sure that no prior settings would be used, I deleted /etc/mysql. Following this, I tried : apt-get install libdbd-mysql libdbd-mysql-perl libmysqlclient10 libmysqlclient12 mysql-client mysql-common mysql-doc mysql-server This quits with an error : Setting up mysql-server (4.0.22-2) ... Stopping MySQL database server: mysqld. WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian. Starting MySQL database server: mysqld. /etc/init.d/mysql: line 79: /etc/mysql/debian-start: No such file or directory invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing mysql-server (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) Two questions come to mind : 1. If mysql were removed, why would old settings still stay on, and why would they be needed at all for a new installation ? 2. How do I fix the above ? Thanks. |
| |||
| On Tue, 23 Nov 2004 23:24:56 -0500, Madhusudan Singh <spammers-go-here@spam.invalid> wrote: > Hi > > I was having some configuration problems with mysql. So I apt-get remove'd > it and to make sure that no prior settings would be used, I > deleted /etc/mysql. > > Following this, I tried : > > apt-get install libdbd-mysql libdbd-mysql-perl libmysqlclient10 > libmysqlclient12 mysql-client mysql-common mysql-doc mysql-server > > This quits with an error : > > Setting up mysql-server (4.0.22-2) ... > Stopping MySQL database server: mysqld. > > WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian. > Starting MySQL database server: mysqld. > /etc/init.d/mysql: line 79: /etc/mysql/debian-start: No such file or > directory > invoke-rc.d: initscript mysql, action "start" failed. > dpkg: error processing mysql-server (--configure): > subprocess post-installation script returned error exit status 1 > Errors were encountered while processing: > mysql-server > E: Sub-process /usr/bin/dpkg returned an error code (1) > > > Two questions come to mind : > > 1. If mysql were removed, why would old settings still stay on, and why > would they be needed at all for a new installation ? The old settings are kept so they can be used if you reinstall or upgrade the package. > 2. How do I fix the above ? > apt-get remove --purge mysql -- "At a scheduled time, the robot would pull the flush lever and scream as it got sucked down the drain." --Kibo |
| |||
| Bill Marcum wrote: >> >> Two questions come to mind : >> >> 1. If mysql were removed, why would old settings still stay on, and why >> would they be needed at all for a new installation ? > > The old settings are kept so they can be used if you reinstall or > upgrade the package. > >> 2. How do I fix the above ? >> > apt-get remove --purge mysql > Hi I used the --purge option and tried to install as above (apt-get install ...) . I now get : (and there is no my.cnf in /etc/mysql after the installation fails). WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian. Starting MySQL database server: mysqld...failed. Please take a look at the syslog. From /var/log/syslog : Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing db table Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing host table Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing user table Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing func table Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing tables_priv table Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing columns_priv table Nov 24 11:16:31 nanak mysqld_safe[29381]: Installing all prepared tables Nov 24 11:16:31 nanak mysqld_safe[29381]: 041124 11:16:31 /usr/sbin/mysqld: Shutdown Complete Nov 24 11:16:31 nanak mysqld_safe[29381]: Nov 24 11:16:31 nanak mysqld_safe[29381]: Nov 24 11:16:31 nanak mysqld_safe[29381]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! Nov 24 11:16:31 nanak mysqld_safe[29381]: To do so, start the server, then issue the following commands: Nov 24 11:16:31 nanak mysqld_safe[29381]: /usr/bin/mysqladmin -u root password 'new-password' Nov 24 11:16:31 nanak mysqld_safe[29381]: /usr/bin/mysqladmin -u root -h nanak password 'new-password' Nov 24 11:16:31 nanak mysqld_safe[29381]: See the manual for more instructions. Nov 24 11:16:31 nanak mysqld_safe[29381]: Nov 24 11:16:31 nanak mysqld_safe[29381]: Please report any problems with the /usr/bin/mysqlbug script! Nov 24 11:16:31 nanak mysqld_safe[29381]: Nov 24 11:16:31 nanak mysqld_safe[29381]: The latest information about MySQL is available on the web at Nov 24 11:16:31 nanak mysqld_safe[29381]: http://www.mysql.com Nov 24 11:16:31 nanak mysqld_safe[29381]: Support MySQL by buying support/licenses at https://order.mysql.com Nov 24 11:16:31 nanak mysqld_safe[29381]: Nov 24 11:16:31 nanak mysqld_safe[29404]: 041124 11:16:31 /usr/sbin/mysqld: Can't find file: './mysql/user.frm' (errno: 13) Nov 24 11:16:31 nanak mysqld_safe[29404]: ERROR: 1017 Can't find file: './mysql/user.frm' (errno: 13) Nov 24 11:16:31 nanak mysqld_safe[29404]: 041124 11:16:31 /usr/sbin/mysqld: Shutdown Complete Nov 24 11:16:31 nanak mysqld_safe[29404]: Nov 24 11:16:31 nanak mysqld_safe[29409]: 041124 11:16:31 /usr/sbin/mysqld: Can't find file: './mysql/user.frm' (errno: 13) Nov 24 11:16:31 nanak mysqld_safe[29409]: ERROR: 1017 Can't find file: './mysql/user.frm' (errno: 13) Nov 24 11:16:31 nanak mysqld_safe[29409]: 041124 11:16:31 /usr/sbin/mysqld: Shutdown Complete Nov 24 11:16:31 nanak mysqld_safe[29409]: Nov 24 11:16:31 nanak mysqld_safe[29454]: started Nov 24 11:16:31 nanak mysqld[29459]: InnoDB: The first specified data file ./ibdata1 did not exist: Nov 24 11:16:31 nanak mysqld[29459]: InnoDB: a new database to be created! Nov 24 11:16:31 nanak mysqld[29459]: 041124 11:16:31 InnoDB: Setting file ./ibdata1 size to 10 MB Nov 24 11:16:31 nanak mysqld[29459]: InnoDB: Database physically writes the file full: wait... Nov 24 11:16:32 nanak mysqld[29459]: 041124 11:16:32 InnoDB: Log file ./ib_logfile0 did not exist: new to be created Nov 24 11:16:32 nanak mysqld[29459]: InnoDB: Setting log file ./ib_logfile0 size to 5 MB Nov 24 11:16:32 nanak mysqld[29459]: InnoDB: Database physically writes the file full: wait... Nov 24 11:16:35 nanak mysqld[29459]: InnoDB: Doublewrite buffer not found: creating new Nov 24 11:16:35 nanak mysqld[29459]: InnoDB: Doublewrite buffer created Nov 24 11:16:35 nanak mysqld[29459]: InnoDB: Creating foreign key constraint system tables Nov 24 11:16:35 nanak mysqld[29459]: InnoDB: Foreign key constraint system tables created Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 InnoDB: Started Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13) Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13) Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 Aborting Nov 24 11:16:35 nanak mysqld[29459]: Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 InnoDB: Starting shutdown... Nov 24 11:16:37 nanak mysqld[29459]: 041124 11:16:37 InnoDB: Shutdown completed Nov 24 11:16:37 nanak mysqld[29459]: 041124 11:16:37 /usr/sbin/mysqld: Shutdown Complete Nov 24 11:16:37 nanak mysqld[29459]: Nov 24 11:16:37 nanak mysqld_safe[29711]: ended Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: 0 processes alive and '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf ping' resulted in Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: An attempt to restart mysql fails with : WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian. How do I make sure that mysql is installed by apt-get assuming that there is not a trace of a mysql system (which --purge ensured presumably) and it does need to create an initial default my.cnf ? |
| |||
| On 11/24/04 21:54, Madhusudan Singh wrote: > Bill Marcum wrote: > > >>> Two questions come to mind : >>> >>>1. If mysql were removed, why would old settings still stay on, and why >>>would they be needed at all for a new installation ? >> >>The old settings are kept so they can be used if you reinstall or >>upgrade the package. >> >> >>>2. How do I fix the above ? >>> >> >>apt-get remove --purge mysql >> > > > Hi > > I used the --purge option and tried to install as above (apt-get > install ...) . I now get : (and there is no my.cnf in /etc/mysql after the > installation fails). > > WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian. > Starting MySQL database server: mysqld...failed. > Please take a look at the syslog. > > From /var/log/syslog : > > Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing db table > Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing host table > Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing user table > Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing func table > Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing tables_priv table > Nov 24 11:16:31 nanak mysqld_safe[29381]: Preparing columns_priv table > Nov 24 11:16:31 nanak mysqld_safe[29381]: Installing all prepared tables > Nov 24 11:16:31 nanak mysqld_safe[29381]: 041124 11:16:31 /usr/sbin/mysqld: > Shutdown Complete Nov 24 11:16:31 nanak > mysqld_safe[29381]: > Nov 24 11:16:31 nanak mysqld_safe[29381]: > Nov 24 11:16:31 nanak mysqld_safe[29381]: PLEASE REMEMBER TO SET A PASSWORD > FOR THE MySQL root USER ! > Nov 24 11:16:31 nanak mysqld_safe[29381]: To do so, start the server, then > issue the following commands: > Nov 24 11:16:31 nanak mysqld_safe[29381]: /usr/bin/mysqladmin -u root > password 'new-password' > Nov 24 11:16:31 nanak mysqld_safe[29381]: /usr/bin/mysqladmin -u root -h > nanak password 'new-password' > Nov 24 11:16:31 nanak mysqld_safe[29381]: See the manual for more > instructions. > Nov 24 11:16:31 nanak mysqld_safe[29381]: > Nov 24 11:16:31 nanak mysqld_safe[29381]: Please report any problems with > the /usr/bin/mysqlbug script! > Nov 24 11:16:31 nanak mysqld_safe[29381]: > Nov 24 11:16:31 nanak mysqld_safe[29381]: The latest information about MySQL > is available on the web at > Nov 24 11:16:31 nanak mysqld_safe[29381]: http://www.mysql.com > Nov 24 11:16:31 nanak mysqld_safe[29381]: Support MySQL by buying > support/licenses at https://order.mysql.com > Nov 24 11:16:31 nanak mysqld_safe[29381]: > Nov 24 11:16:31 nanak mysqld_safe[29404]: 041124 11:16:31 /usr/sbin/mysqld: > Can't find file: './mysql/user.frm' (errno: 13) > Nov 24 11:16:31 nanak mysqld_safe[29404]: ERROR: 1017 Can't find file: > './mysql/user.frm' (errno: 13) > Nov 24 11:16:31 nanak mysqld_safe[29404]: 041124 11:16:31 /usr/sbin/mysqld: > Shutdown Complete > Nov 24 11:16:31 nanak mysqld_safe[29404]: > Nov 24 11:16:31 nanak mysqld_safe[29409]: 041124 11:16:31 /usr/sbin/mysqld: > Can't find file: './mysql/user.frm' (errno: 13) > Nov 24 11:16:31 nanak mysqld_safe[29409]: ERROR: 1017 Can't find file: > './mysql/user.frm' (errno: 13) I guess, due to non-availability of my.cnf, mysqld is trying to find the said file in current dir. > Nov 24 11:16:31 nanak mysqld_safe[29409]: 041124 11:16:31 /usr/sbin/mysqld: > Shutdown Complete > Nov 24 11:16:31 nanak mysqld_safe[29409]: > Nov 24 11:16:31 nanak mysqld_safe[29454]: started > Nov 24 11:16:31 nanak mysqld[29459]: InnoDB: The first specified data > file ./ibdata1 did not exist: same, again. > Nov 24 11:16:31 nanak mysqld[29459]: InnoDB: a new database to be created! > Nov 24 11:16:31 nanak mysqld[29459]: 041124 11:16:31 InnoDB: Setting > file ./ibdata1 size to 10 MB > Nov 24 11:16:31 nanak mysqld[29459]: InnoDB: Database physically writes the > file full: wait... > Nov 24 11:16:32 nanak mysqld[29459]: 041124 11:16:32 InnoDB: Log > file ./ib_logfile0 did not exist: new to be created same, again > Nov 24 11:16:32 nanak mysqld[29459]: InnoDB: Setting log file ./ib_logfile0 > size to 5 MB > Nov 24 11:16:32 nanak mysqld[29459]: InnoDB: Database physically writes the > file full: wait... > Nov 24 11:16:35 nanak mysqld[29459]: InnoDB: Doublewrite buffer not found: > creating new > Nov 24 11:16:35 nanak mysqld[29459]: InnoDB: Doublewrite buffer created > Nov 24 11:16:35 nanak mysqld[29459]: InnoDB: Creating foreign key constraint > system tables > Nov 24 11:16:35 nanak mysqld[29459]: InnoDB: Foreign key constraint system > tables created > Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 InnoDB: Started > Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 /usr/sbin/mysqld: Can't > find file: './mysql/host.frm' (errno: 13) same, again. > Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 Fatal error: Can't open > privilege tables: Can't find file: './mysql/host.frm' (errno: 13) plz, check if the host.frm and, or some other files exist in your /var/lib/mysql/mysql/ > Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 Aborting > Nov 24 11:16:35 nanak mysqld[29459]: > Nov 24 11:16:35 nanak mysqld[29459]: 041124 11:16:35 InnoDB: Starting > shutdown... > Nov 24 11:16:37 nanak mysqld[29459]: 041124 11:16:37 InnoDB: Shutdown > completed > Nov 24 11:16:37 nanak mysqld[29459]: 041124 11:16:37 /usr/sbin/mysqld: > Shutdown Complete > Nov 24 11:16:37 nanak mysqld[29459]: > Nov 24 11:16:37 nanak mysqld_safe[29711]: ended > Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: 0 processes alive and > '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf ping' > resulted in > Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: ^G/usr/bin/mysqladmin: > connect to server at 'localhost' failed > Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: error: 'Can't connect to > local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' > Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: Check that mysqld is running > and that the socket: '/var/run/mysqld/mysqld.sock' exists! > Nov 24 11:16:43 nanak /etc/init.d/mysql[29989]: > > An attempt to restart mysql fails with : > > WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian. > > How do I make sure that mysql is installed by apt-get assuming that there is > not a trace of a mysql system (which --purge ensured presumably) and it > does need to create an initial default my.cnf ? I think the problem could be in pre-install scripts; try finding an example my.cnf copy it to your /etc/mysql/my.cnf and starting mysqld: /etc/init.d/mysql start HTH -- Dr Balwinder Singh Dheeman Registered Linux User: #229709 CLLO (Chief Linux Learning Officer) Machines: #168573, 170593, 259192 Anu's Linux@HOME Distros: Knoppix, Fedora, FreeBSD More: http://anu.homelinux.net/~bsd/ Visit: http://counter.li.org/ |
| |||
| Madhusudan Singh wrote: > I used the --purge option and tried to install as above (apt-get > install ...) . I now get : (and there is no my.cnf in /etc/mysql after the > installation fails). > > WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian. > Starting MySQL database server: mysqld...failed. > Please take a look at the syslog. If you want a clean system for reinstalling, purge ALL mysql packages. The file /etc/mysql/my.cnf comes with the package mysql-common. Remove that and all other packages (mysql-server, mysql-client, etc.) and then try again. Good luck. Ed |
| |||
| Edward Buck wrote: > Madhusudan Singh wrote: > >> I used the --purge option and tried to install as above (apt-get >> install ...) . I now get : (and there is no my.cnf in /etc/mysql after >> the installation fails). >> >> WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian. >> Starting MySQL database server: mysqld...failed. >> Please take a look at the syslog. > > If you want a clean system for reinstalling, purge ALL mysql packages. > The file /etc/mysql/my.cnf comes with the package mysql-common. Remove > that and all other packages (mysql-server, mysql-client, etc.) and then > try again. > > Good luck. > Ed If you look over the thread, I already did that. I found the solution. The option --reinstall. |
| |||
| In article <80Uod.1084$i6.770@news.itd.umich.edu>, Madhusudan Singh <spammers-go-here@spam.invalid> wrote: >1. If mysql were removed, why would old settings still stay on, and why >would they be needed at all for a new installation ? Could it be that you didn't remove /etc/init.d/mysql? And that one file was sufficient to fool the installer into thinking that it didn't need to install any configuration files at all? |
| ||||
| Madhusudan Singh wrote: > 1. If mysql were removed, why would old settings still stay on, and why > would they be needed at all for a new installation ? If the package was removed but not purged the configuration files were left in place. If the package was then installed again the old configuration files were not replaced. -- John Hasler |