Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
yes, you need to move the database. I think it is just a directory, you can move it (first copy and remove the original if the new one is working). When you open a database you can specify the location. But anyway, would be nice to know more to give better help. (In general putting database onto the root filesystem is not a good idea).
at final:
[root@whdnew mysql]# df /home/mysql
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/ol_whdnew-home 200303044 3813816 196489228 2% /home
mysql> select @@datadir;
+--------------+
| @@datadir |
+--------------+
| /home/mysql/ |
+--------------+
1 row in set (0.00 sec)
yes, that looks almost perfect, just you can use the original socket /var/lib/mysql/mysql.sock, do not need to move it and/or link it. But you can use the new socket too.
And, if you need to expand space in a virtual machine ... I hope that you have LVM = Logical Volume Management installed, which is the usual default. [i](If not, you can install it.)
Then, you create a new virtual disk, add it to a "storage pool," then expand the "logical volume" using space from that pool. Finally, expand the filesystem to recognize the new space. (All of which you can do without downtime.) There are an abundance of online tutorials showing you exactly how the trick is done.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.