Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I removed mysql, then reinstalled it. Everything seemed to go normally during the install. Apparently, debian thinks mysql is installed, but it isn't - or does not seem to be.
When I do a whereis, I get nothing. When I look for the files, they are really not there.
Quote:
# whereis mysql
mysql:
# /usr/local# mysqld
100109 18:40:23 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
100109 18:40:23 [ERROR] Aborting
# mysql_install_db
Could not find help file 'fill_help_tables.sql' in /usr/share/mysql or inside /usr.
# /etc/init.d/mysql
-bash: /etc/init.d/mysql: No such file or directory
# /usr/local# /etc/init.d/mysqld
-bash: /etc/init.d/mysqld: No such file or directory
Quote:
# aptitude install mysql-server mysql-client
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
The following packages have been kept back:
openssh-client openssh-server
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
I removed mysql, then reinstalled it. Everything seemed to go normally during the install. Apparently, debian thinks mysql is installed, but it isn't - or does not seem to be.
"debian thinks" um, what part of Debian is doing this thinking? dpkg is what you should use to see the status of packages. For example:
Code:
dpkg -l 'mysql*' | grep ^ii
Quote:
When I do a whereis, I get nothing. When I look for the files, they are really not there.
So this is a question about "whereis"? Or how to query dpkg?
Okay, I'll put it this way: nothing works. Directories such as "/usr/share/mysql" don't exist. There does not seem to be a socket file. Yet aptitude, and maybe even dpkg seem to indicate that everything installed correctly.
Quote:
# dpkg -l 'mysql*' | grep ^ii
ii mysql-client 5.0.32-7etch11 mysql database client (meta package depending on the latest version)
ii mysql-client-5.0 5.0.32-7etch11 mysql database client binaries
ii mysql-common 5.0.32-7etch11 mysql database common files (e.g. /etc/mysql/my.cnf)
ii mysql-server 5.0.32-7etch11 mysql database server (meta package depending on the latest version)
ii mysql-server-5.0 5.0.32-7etch11 mysql database server binaries
Did that, got this message at the end of the aptitude output:
Quote:
invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.
When I try to run mysql, I get this:
Quote:
# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
# mysqld
100110 7:37:39 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
The install/remove scripts are failing because the mysql start/stop script is missing. You have a couple of options, edit the failing install/remove script to simply return 0 or you could try to manually recover /etc/init.d/mysql from somewhere.
For example, another machine, or manually unpack the mysql-server-5.0 pacakge using ar and tar, etc. Do you know how/why /etc/init.d/mysql was deleted in the first place, and if other files were deleted? Knowing this will help indicate the best way to recover your mysql installation
After fighting with this for days on end, I gave up in complete frustration, and asked my VPS to completely re-image my server. And now I am still unable to get msyql installed. I have uninstalled, purged, reinstalled, and so on many *many* times.
I looked in /var/log/dpkg.log, but that was not help - it just told that MySQL stopped installing half-way through.
I also looked in /var/log/deamon.log
Quote:
# tail daemon.log
Jan 13 19:13:03 wb mysqld_safe[17546]: http://www.mysql.com
Jan 13 19:13:03 wb mysqld_safe[17546]: Support MySQL by buying support/licenses at http://shop.mysql.com
Jan 13 19:13:04 wb mysqld_safe[17711]: started
Jan 13 19:13:04 wb mysqld[17714]: InnoDB: Error: pthread_create returned 12
Jan 13 19:13:04 wb mysqld_safe[17723]: ended
Jan 13 19:13:20 wb /etc/init.d/mysql[19870]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jan 13 19:13:20 wb /etc/init.d/mysql[19870]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jan 13 19:13:20 wb /etc/init.d/mysql[19870]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jan 13 19:13:20 wb /etc/init.d/mysql[19870]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jan 13 19:13:20 wb /etc/init.d/mysql[19870]:
btw, I am not sure where that "wb" is coming from. That used to be the alias for my host name, but not anymore.
Also the .sock file does not exist.
[quote]
# ls -l /var/run/mysqld/mysqld.sock
ls: /var/run/mysqld/mysqld.sock: No such file or directory
[/quote
]
Last edited by walterbyrd; 01-13-2010 at 01:25 PM.
Reason: more information
So now it seems to be failing in the post install script during "/etc/init.d/mysql start". Have you tried putting "set -x" on the 2nd line of that script and then doing 'dpkg --reconfigure mysql-server-5.0'?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.