After reading a tutorial here on transfering a server from one box to another, I have several nuisances which are driving me mad. Let me say 1st that my server is working, ISPConfig is working and Apache2 is working, correctly servering pages. Background: 1st server was Fedora Core 8. 2nd server Debian Etch When dumping the sql dump using command line, it included the mysql database from the first server. I didn't notice this and I imported this dump file using phpmyadmin on the debian box. Well, as you can imgaine, I have issues concerning this. Here is what I am getting: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) -- This I have been able to fix inserting the user into the new mysql.user table. Now when I try to fix the root user, I get a duplicate key issue. This is my error message: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' 2nd issue: When I upload files to my webs, they are issued www-data www-data as file ownership. Can someone please help me fix this? Also, I cannot start/stop/restart services from ISPConfig control panel anymore. NOTE: I have approximately 62 websites on this new box and they are all functioning, so reinstalling the OS/server isn't an option for me.
Take a look here: http://www.howtoforge.com/forums/showthread.php?t=5553&highlight=mysql+forgot+password How do you upload the files? With an FTP client? Can you start/stop/restart the services on the command line? I think the problem might be that the isp_server table contains values for Fedora, but your new system is Debian, so you might have to adjust these values.
Mysql Error Thanks, Falko for responding. I checked the isp_server table and there were a couple of problems there. I still have the error when starting mysql, yet I can login to mysql using my root password. I think the problem is with the /etc/password and/or /etc/shadow.
mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'
drwxr-xr-x 2 mysql mysql 4096 2008-02-08 12:02 conf.d -rw------- 1 root root 298 2008-02-06 13:14 debian.cnf -rwxr-xr-x 1 mysql mysql 1102 2008-01-16 03:57 debian-start -rw-r--r-- 1 mysql mysql 3571 2008-02-06 13:17 my.cnf -rw-r--r-- 1 mysql mysql 3571 2008-01-16 16:51 my.cnf_old
Here is my /etc/mysql/debian-start Code: #!/bin/bash # # This script is executed by "/etc/init.d/mysql" on every (re)start. # # Changes to this file will be preserved when updating the Debian package. # source /usr/share/mysql/debian-start.inc.sh MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/my.cnf" MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/my.cnf" MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/my.cnf" MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables" MYCHECK_PARAMS="--all-databases --fast --silent" MYCHECK_RCPT="root" # The following commands should be run when the server is up but in background # where they do not block the server start and in one shell instance so that # they run sequentially. They are supposed not to echo anything to stdout. # If you want to disable the check for crashed tables comment # "check_for_crashed_tables" out. # (There may be no output to stdout inside the background process!) echo "Checking for corrupt, not cleanly closed and upgrade needing tables." ( upgrade_system_tables_if_necessary; check_for_crashed_tables; ) >&2 & exit 0 And this is my /etc/mysql/debian.cnf Code: # Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = debian-sys-maint password = xxxxxxxxx socket = /var/run/mysqld/mysqld.sock [mysql_upgrade] user = debian-sys-maint password = xxxxxxxxx socket = /var/run/mysqld/mysqld.sock basedir = /usr Falko-- I should note here that I was having problems with debian-sys-maint user before this particular error. I fixed it by adding a new debian-sys-maint user to the mysql user table.
And the password for the debian-sys-maint user is now correct in /etc/mysql/debian.cnf? Is the root password listed in my.cnf?