Verify if MariaDB 10.2 is installed rpm -qa|grep -i maria|grep "\-10.2." First you need to change the MariaDB repo and replace it with MariaDB 10.4 repo: sed -i 's/10.2/10.4/g' /etc/yum.repos.d/mariadb.repo Second remove MariaDB 10.2 : systemctl stop mariadb mysql mysqld systemctl disable mariadb rpm --nodeps -ev MariaDB-server Third Install MariaDB 10.4 : yum clean all […]
Category: MySQL
How to connect MySQL database remotely
How to connect MySQL database remotely - Open MySQL port 3306 or whitelist your IP in the firewall - Create remote MySQL user from MySQL manager in CWP * We recommend whitelisting IP in the firewall as it is a much safer option. Example of whitelisting IP from the command line csf -a 10.10.23.124 "mysql […]
MariaDB Upgrade to the new version
Check which version of MariaDB is installed on your server rpm -qa|grep -i maria MariaDB Repository Changes Modify repo file to the version you want to upgrade Edit File: /etc/yum.repos.d/mariadb.repo [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.2/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 * Modify 10.2 with the version you want to upgrade Example for upgrade to MariaDB 10.5 […]
MariaDB Upgrade from 10.1 to 10.2
Verify if MariaDB 10.1 is installed rpm -qa|grep -i maria|grep "\-10.1." Upgrade service mysql stop service mariadb stop systemctl disable mariadb rpm --nodeps -ev MariaDB-server yum -y install MariaDB-server yum -y update "MariaDB-*" systemctl enable mariadb service mariadb start mysql_upgrade Check for the custom configuration diff -Bw /etc/my.cnf.d/server.cnf.rpmsave /etc/my.cnf.d/server.cnf Verify upgraded packages rpm -qa|grep -i […]
How to install Adminer Database management
Database management in a single PHP file website: https://www.adminer.org/ 1.Download Adminer from the downloads page cd /usr/local/cwpsrv/var/services/ mkdir adm;cd adm https://github.com/vrana/adminer/releases/download/v4.7.1/adminer-4.7.1.php mv adminer-4.7.1.php adminer.php cd /usr/local/cwpsrv/var/services/ chown cwpsvc:cwpsvc -R adm 2.Add below config to /usr/local/cwpsrv/conf/cwp_services.conf location /adm { root /usr/local/cwpsrv/var/services; index index.html index.htm index.php adminer.php; location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_read_timeout […]
MySQL Error: Too many connections
Error on the website or in cwp: ERROR 1040 (HY000): Too many connections PHP Warning: mysqli_connect(): (HY000/1040): Too many connections The default value for the maximum permitted number of simultaneous client connections is 150. If you have sites with high peaks or high traffic then you can increase the limit. Check the current connection limits […]
MySQL Manager NOT working
MySQL Manager in CWP not working issues: - list of databases is not shown - can't create new database - can't create new user Most common issues are that you have added invalid config into mysql config files. You can check this from the command line by using one of the following commands mysql --version […]
MySQL Login details
You can find MySQL root password in the file /root/.my.cnf: Example from the ssh/shell cat /root/.my.cnf [client] password=ydVg5g3Wz2FH user=root ** MySQL root password in this case would be ydVg5g3Wz2F Users can log in to MySQL/PhpMyAdmin by using the same login credentials as for the user control panel. You can also make additional mysql users by […]
Import / Export MySQL Database
How to import or export MySQL database with command line. This is also useful when working with big databases. Export database info file mysqldump DATABASE-NAME > FILE-NAME.sql Export database into compressed file to save space mysqldump DATABASE-NAME | gzip FILE-NAME.sql.gz Export database into compressed file with date name to save space mysqldump DATABASE-NAME | gzip […]
Remote MySQL with SOCAT socket
How to make a remote MySQL server with socket by using SOCAT. Remote MySQL advantages - move MySQL CPU usage from local CWP web server - move MySQL disk IO operations from disk - move MySQL disk space usage to other server - improve performances by moving MySQL to SSD multi-core powered server ... on […]
How to reset MySQL root password
Instructions for reseting MySQL root password. MySQL root password on the CWP servers can be reset by using cwp scripts, usage: sh /scripts/mysql_pwd_reset or /scripts/mysql_pwd_reset This script will stop MySQL run it in a safe mode, set RANDOM password and then restart the MySQL in normal mode with a new password. If you do a […]
How to change MySQL Location
How to Safely Change Location of the MySQL Data Directory (partition/disk) Most Used Cases are: - Useful for migration of the MySQL to SSD Disk and to get the best performances. - Useful if you are out of the disk space on your partition or a disk. In this tutorial we will move MySQL to […]
How to upgrade MySQL Server
How Can I upgrade MySQL server? You can upgrade the MySQL server by using any official tutorial on the internet, its suggested to make a backup of all databases before doing an upgrade. Our Managed support will also include MySQL upgrade so if you need assistance you can grab it. MySQL Upgrade Instructions (You can […]