dwm
Verified User
With the clean installation mysql 5.0 was installed. I used this the mysql-client and mysql-admin to connect to out remote mysql 4.1 server, but this was horrible! Dont ever try to do this.. or you will get this error:
Mysql.com also tells me i need to go from 4.0 to 4.1 first, then from 4.1 to 5.0 because they develop in this way. Each release has only updates for updating from the last version!
So what i did was editing the /usr/local/directadmin/custombuild/options.conf and set mysql=4.1 and saved the file. I then did:
You will notice that no mysql package was downloaded! Running './build mysql' will fail. I overlooked this and saw there is no 4.1 mysql package for debian at the directadmin fileserver!!
Installing mysql without using CustomBuild:
I am having existing customers databases so i really needed to get mysql 4.1 working. I first downloaded the 4.1 binary (pre-compiled) package for Linux x86 from the official mysql website, and replaced the current mysql symbolic link pointing to the 4.x folder instead of to the 5.x folder:
Mention that we do not remove the 4.1 installation! You never know if 4.1 is getting to work. If not, you can remove the symbolic link to 4.1 and make a new symbolic link to 5.x and restart mysql. Then everything works again fine!
Now we need to make 4.1 to work. Directadmin makes some customizations by default installation so we have to add those too. Add a symbolic link to the database tables directory:
Go to /usr/local/directadmin/conf/ and do this:
The displayed username and password are needed to exist in the mysql database. Therefor we are going to add these:
Another console shows up. This is not the ssh commandline but the mysql commandline. Only do what i tell you to do below:
Now also the mysql user works for managing users within the DirectAdmin controlpanel. The mysql binary should run now:
Problems with changing your default mysql to mysql 4.1 can be posted here. I will try to help. Otherwise contact John at [email protected] for furthur questions. He helped me too with solving this problem!
I researched this problem at mysql.com, directadmin.com/forum and with google. Also i tried to customise my /etc/my.cnf . Nothing helped. I asked some technical managers and the only solution is to downgrade to mysql 4.1 because i already have existing customers with existing mysql 4.x databases.Lost connection to MySQL server at 'reading authorization packet'
Mysql.com also tells me i need to go from 4.0 to 4.1 first, then from 4.1 to 5.0 because they develop in this way. Each release has only updates for updating from the last version!
So what i did was editing the /usr/local/directadmin/custombuild/options.conf and set mysql=4.1 and saved the file. I then did:
./build clean
./build update
You will notice that no mysql package was downloaded! Running './build mysql' will fail. I overlooked this and saw there is no 4.1 mysql package for debian at the directadmin fileserver!!
Installing mysql without using CustomBuild:
I am having existing customers databases so i really needed to get mysql 4.1 working. I first downloaded the 4.1 binary (pre-compiled) package for Linux x86 from the official mysql website, and replaced the current mysql symbolic link pointing to the 4.x folder instead of to the 5.x folder:
Code:
# /etc/init.d/msyqld stop
# killall mysqld
# cd /usr/local/
# ls -al
lrwxrwxrwx 1 root root 8 2007-12-14 16:23 mysql -> mysql-5.0.45-linux-i686
drwxr-xr-x 13 root mysql 4.0K 2007-12-14 16:09 mysql-5.0.45-linux-i686
# rm -f mysql
# mv mysql-5.0.45-linux-i686 mysql5.0.45
# wget http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-standard-4.1.22-pc-linux-gnu-i686-glibc23.tar.gz/from/http://mirror.hostfuss.com/mysql/
# tar -zxf mysql-standard-4.1.22-pc-linux-gnu-i686-glibc23.tar.gz
# mv mysql-standard-4.1.22-pc-linux-gnu-i686-glibc23 mysql4.1
# ln -s mysql4.1/ mysql
Mention that we do not remove the 4.1 installation! You never know if 4.1 is getting to work. If not, you can remove the symbolic link to 4.1 and make a new symbolic link to 5.x and restart mysql. Then everything works again fine!
Now we need to make 4.1 to work. Directadmin makes some customizations by default installation so we have to add those too. Add a symbolic link to the database tables directory:
cd /usr/local/mysql4.1/
mv data data.moved
ln -s /home/mysql data
Go to /usr/local/directadmin/conf/ and do this:
# cat mysql.conf
The displayed username and password are needed to exist in the mysql database. Therefor we are going to add these:
# /etc/init.d/mysql start
# mysql -uda_admin -p
(now enter the password as retreived from the mysql.conf above and press enter/break)
Another console shows up. This is not the ssh commandline but the mysql commandline. Only do what i tell you to do below:
mysql> use mysql;
mysql> GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY 'The-password-from-the-mysql.conf' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> UPDATE user SET password=password('The-password-from-the-mysql.conf');
mysql> FLUSH PRIVILEGES;
mysql> quit;
Now also the mysql user works for managing users within the DirectAdmin controlpanel. The mysql binary should run now:
/etc/init.d/mysql stop
/etc/init.d/mysql start
ps aux | grep mysql
Problems with changing your default mysql to mysql 4.1 can be posted here. I will try to help. Otherwise contact John at [email protected] for furthur questions. He helped me too with solving this problem!
Last edited: