Thread: Move Mysql Other directory: help
03-12-2018, 02:38 AM #1
Move Mysql Other directory: help
I'm following this manual to move the mysql directory
but there is something wrong
ln -s / home / mysql / var / lib / mysql
ln: failed to create symbolic link '/ var / lib / mysql / mysql': File exists
and in addition to finishing the steps, the database is still recorded in the old directory
03-12-2018, 11:43 AM #2
I'm going to assume /var and /home are two different mounts so you need more space and this is how you're accomplishing it.
So here's a quick list of commands for how I would accomplish this:
# Stop MySQL systemctl stop mysqld # Verify MySQL directory size du -h --max-depth=1 /var/lib/mysql # Move the MySQL directory mv /var/lib/mysql/ /home # Verify the size has moved du -h --max-depth=1 /home/mysql # Symlink them ln -s /home/mysql /var/lib/mysql # restart mysql systemctl start mysqld
03-12-2018, 02:16 PM #3
hire the services of www.24x7servermanagement.com
and now no database works.
I'm waiting for it to be solved, and have my tickets respond.
there is some way to go back to the previous
and check var/lib/mysql no exist yet
03-12-2018, 02:18 PM #4
Does your data exist in /home/mysql ?
03-12-2018, 02:25 PM #5
03-12-2018, 02:26 PM #6
All you should have to run then is the following command.
ln -s /home/mysql /var/lib/mysql
03-12-2018, 02:29 PM #7
03-12-2018, 02:31 PM #8
Ah, I missed the [email protected] in the other picture.
03-12-2018, 02:35 PM #9
all the pages that use databases do not work.
those who use whcms leave this message
restart but same error
and error log mysql
03-12-2018, 02:39 PM #10
Hmmm, if MySQL is booting that's a good sign, but if no one can access it perhaps we have a permission issue.
cd /home/mysql ls -lah
03-12-2018, 02:42 PM #11
03-12-2018, 02:45 PM #12
Permissions look correct.
I'd say your next step would be to try and manually connect to the database.
mysql -u username -p # then use valvps_whmcs; show tables;
03-12-2018, 02:46 PM #13
Seem KnownHost-DanielP is an web hosting expert here, why (valvps) don't send him server account and ask him to look into it and solve the problem directly? If he can fix it for you then you can reason or solutions that he used. That's better to ask via images
03-12-2018, 02:49 PM #14
Hopefully by doing it this way other people may find this thread and the commands could help them as well
03-12-2018, 02:53 PM #15
I did the test with another website that has whmcs and has the same problem
I see that it connects and lists the databases.
now if I do not understand why it does not work
03-12-2018, 02:55 PM #16
I'd say make sure to fully restart apache as it's possible something is hung up with the MySQL location.
Alternatively look for error_log files in your home directory that may give more detailed errors.
So for now
systemctl restart httpd
03-12-2018, 02:58 PM #17
This important ?
03-12-2018, 03:10 PM #18
chown -h mysql:mysql /var/lib/mysql
03-12-2018, 03:13 PM #19
Well, update Mysql to the latest version
and this has solved the problem.
I want to thank you for taking the time to help me
thank you very much.
03-12-2018, 03:14 PM #20
Replies: 0 | Views: 148Last post by LPTechs, 03-12-2018, 01:20 PM
By robert4u in forum VPS Hosting OffersReplies: 0 | Views: 36Last post by robert4u, 03-13-2018, 03:49 AM
Replies: 0 | Views: 113Last post by LPTechs, 03-13-2018, 01:37 PM
Replies: 0 | Views: 39Last post by WebHostingUK, 03-13-2018, 05:33 PM
Replies: 6 | Views: 191Last post by valvps, 03-17-2018, 03:23 AM
By HostColor in forum Shared Hosting OffersReplies: 0 | Views: 114Last post by HostColor, 03-11-2018, 05:57 PM
Replies: 6 | Views: 263Last post by KnownHost-DanielP, 03-12-2018, 11:51 AM
Replies: 1 | Views: 159Last post by 24x7serverman, 03-10-2018, 11:44 PM
By Server_Wala in forum Dedicated Hosting OffersReplies: 0 | Views: 63Last post by Server_Wala, 03-09-2018, 08:00 AM
Replies: 0 | Views: 58Last post by fwh, 03-09-2018, 02:33 AM
By CertaHosting in forum Hosted Email OffersReplies: 0 | Views: 9Last post by CertaHosting, Today, 01:49 PM
By CertaHosting in forum Cloud Hosting OffersReplies: 0 | Views: 29Last post by CertaHosting, Today, 01:48 PM
By CertaHosting in forum VPS Hosting OffersReplies: 0 | Views: 45Last post by CertaHosting, Today, 01:46 PM
By CertaHosting in forum Reseller Hosting OffersReplies: 0 | Views: 38Last post by CertaHosting, Today, 01:45 PM
By CertaHosting in forum Shared Hosting OffersReplies: 0 | Views: 37Last post by CertaHosting, Today, 01:43 PM
Replies: 5 | Views: 480Last post by CaygriWEB, 07-28-2017, 02:25 PM
By rwsorensen in forum Web HostingReplies: 20 | Views: 3629Last post by eva2000, 01-15-2017, 01:02 AM
By coredump in forum Dedicated ServerReplies: 7 | Views: 1744Last post by GswHosting, 09-12-2016, 08:25 AM
By DDSvpsHost in forum Web HostingReplies: 3 | Views: 909Last post by RDO Servers, 10-31-2015, 12:16 PM
By Epic in forum Software & ScriptsReplies: 0 | Views: 1197Last post by Epic, 02-15-2015, 11:24 AM