# /usr/local/directadmin/scripts/mysql.sh
Usage: /usr/local/directadmin/scripts/mysql.sh mysqlrootpass da_dbuser da_pass
*** do not use spaces in your passwords ***
[root@server2 scripts]# /usr/local/directadmin/scripts/mysql.sh mysqlrootpass da_dbuser da_pass
*****************************************************
*****************************************************
It seems as though mysql has already been installed.
The directory /var/lib/mysql has been found. For the best results, its recommended that this be deleted.
All database data will be lost if you delete it
Do you want to delete it? (y is recommended)? (y,n) : y
mv: cannot move `/var/lib/mysql' to `/var/lib/mysql.backup/mysql': Directory not empty
Installing MySQL
Preparing... ########################################### [100%]
******************************************************************
A MySQL server package (MariaDB-server-10.0.38-1.el6.i686) is installed.
The current MySQL server package is provided by a different
vendor (Monty Program AB) than MySQL AB, Sun Microsystems, Inc., or Oracle and/or its affiliates.
Some files may be installed to different locations, including log
files and the service startup script in /etc/init.d/.
Upgrading directly from MySQL 10.0 to MySQL 5.5 may not
be safe in all cases. A manual dump and restore using mysqldump is
recommended. It is important to review the MySQL manual's Upgrading
section for version-specific incompatibilities.
A manual upgrade is required.
- Ensure that you have a complete, working backup of your data and my.cnf
files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages. Usually this command will
list the packages you should remove:
rpm -qa | grep -i '^mysql-'
You may choose to use 'rpm --nodeps -ev <package-name>' to remove
the package which contains the mysqlclient shared library. The
library will be reinstalled by the MySQL-shared-compat package.
- Install the new MySQL packages supplied by Oracle and/or its affiliates
- Ensure that the MySQL server is started
- Run the 'mysql_upgrade' program
This is a brief description of the upgrade process. Important details
can be found in the MySQL manual, in the Upgrading section.
******************************************************************
error: %pre(MySQL-server-5.5.31-1.linux2.6.i386) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping MySQL-server-5.5.31-1.linux2.6
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
ls: cannot access /var/lib/mysql/mysql/: No such file or directory
Data needs to be created in /var/lib/mysql/mysql ...
Neither host 'server.hostname.com' nor 'localhost' could be looked up with
'/usr/sbin/resolveip'
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
usermod: no changes
Starting MariaDB.190304 10:57:13 mysqld_safe Logging to '/var/lib/mysql/server.hostname.com'.
190304 10:57:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
.../etc/init.d/mysqld: line 260: kill: (17311) - No such process
ERROR!
Waiting for mysqld to start....
Setting MySQL Root Password...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Setting DirectAdmin user and password...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Securing installation...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)