Trying to move mysql directory in centos 6.6

fritomd wrote on Tuesday, May 26, 2015:

I followed the instructions on moving the mysql data directory http://crashmag.net/change-the-default-mysql-data-directory-with-selinux-enabled

After mysqld restart, I can log in to mysql as root and openemr from the command line. However, the browser returns an error to check if mysqld is running (which it is).

any ideas what I am doing wrong?
thanks

juggernautsei wrote on Tuesday, May 26, 2015:

Frank,
moving the mysql database files is never a good idea or the idea way to relocate a mysql database. More than likely you have a crashed table(s). The best route is to use
$ mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]

Go back to your original install of openEMR and run the mysqldump command from the mysql\bin folder. Then use phpmyadmin to import the dump file into a new database name.

However, if are moving the database on the same machine, you can use the operation tab in phpmyadmin to move the entire database.

Sherwin

visolveemr wrote on Tuesday, May 26, 2015:

Hello Frank,

Kindly check whether you have the correct configurations in the file ‘sites/default/sqlconf.php’.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library

fritomd wrote on Saturday, May 30, 2015:

Sherwin and ViSolve,
thank you for your help. I have spent the last 3 days trying to figure out how to get phpmyadmin running. I know that phpmyadmin is bundled with OEMR and that config.inc.php has already been customized for OpenEMR. When I point my browser to:http://localhost/openemr/phpmyadmin the browser will not connect. I believe the privileges are correct (unchanged from the default) 755 for phpmyadmin. What am I doing wrong? Thanks for your help.
frank

fsgl wrote on Saturday, May 30, 2015:

Once logged into OpenEMR, there should be access to the phpMyAdmin if one navigates from Administration/Other/Database.

One cannot login to phpMyAdmin outside of OpenEMR without modifying the Apache configuration file as explained here.

fsgl wrote on Saturday, May 30, 2015:

Be certain to secure phpMyAdmin as explained in Step Two of the above mentioned webpage.

fritomd wrote on Saturday, May 30, 2015:

Thanks again fsgl. As an administrator I navigated to Administration>Other>Database and nothing was returned except a blank screen.

Let me tell you about myself. As you can probably tell, I have minimal experience as an IT guy. I am a physician who wants to incorporate, to the maximum extent possible, open source software. My office is set up with a server and workstations running CentOS 6. The root directory on the server is not encrypted, but the /home directory is. I want to move the OpenEMR database to the home directory.

Any words of wisdom on:

  1. Why I can not seem to access phpmyadmin from OEMR?
  2. Moving the database?
  3. Is it unrealistic for an MD to think they can go open source?

thanks for your time.
frank

fsgl wrote on Saturday, May 30, 2015:

Hi Frank,

Is there any overwhelming reason to use CentOS? The other CentOS user, sc4goodhealth, preferred Red Hat support over that from Canonical.

I did not own a computer until 2007. Conversion from paper charts to EHR was a DIY project that occurred over 2 months (with manual input of patient demographics & start-up costs totaling $5.99 for the SD card). There is no reason why any other physician cannot do it himself.

If you are open to using an Ubuntu fork, Linux Mint; install & setup should be relatively simple.

If you must stay with CentOS, we can work on the differential diagnosis after your next post.

fritomd wrote on Sunday, May 31, 2015:

I decided to go with CentOS because of RHEL. I felt that RHEL represented the most stable linux distribution. RHEL has abundant well written documentation. As a (nearly) bit for bit open source clone of RHEL, CentOS should have the same attributes. I am married to CentOS after loading it on all of my WS and Server. It would break my heart to try and change things now.

fsgl wrote on Sunday, May 31, 2015:

Being Catholic, we frown on divorce. But if the wife and the mistress can be at the funeral of François Mitterrand…

Would then suggest the following.

If you need MariaDB for another application, reserve it for that purpose. Most of the community uses MySQL, so there is a larger body of experience to draw upon. Not advisable to have both for OpenEMR.

Use sc4goodhealth’s guide & follow the steps verbatim. New users learn sooner or later that freelancing is contra-indicated with a capital C.

If you still have a blank phpMyAdmin, we can work on it further.

sunsetsystems wrote on Sunday, May 31, 2015:

Regarding the original question, that article is 4 years old. Things might have changed.

I think you can move a MySQL data directory and then use a symbolic link where the old one was to point to the new one.

Looks like you can also do it at the database level:

https://dev.mysql.com/doc/refman/5.5/en/symbolic-links.html

Rod
http://www.sunsetsystems.com

bradymiller wrote on Sunday, May 31, 2015:

Hi,

Is encrypting the entire drive an option? Then wouldn’t need to bother moving things around.

-brady
OpenEMR

fritomd wrote on Sunday, June 07, 2015:

Thank you for your suggestions. Encrypting root would not have solved all my issues. When I set up my server, I partitioned the drive so that root would be on its own partition (40GB). /home is on the order of around 900GB. My desire was to isolate / from /home in the event a rouge process (user) filled up /home with data and choked it. At least my OS would continue to function. Thus my desire to move the database to /home.

I really liked the symbolic link idea. In the end, I decided to move all of OEMR to /home/web_pages/openemr and pointed Apache to the directory. It seems to work now.

This is probably not the most elegant solution. Thanks again for everyone’s help.

frank

PS. Please let me know if I am doing something dumb.