Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I was wondering if there is a way to backup the whole mysql database. Are there files I could copy and put them back in the next install? Or some other method of transporting all data to other machine?
I did it. I transplanted the data from one machine to the other. But I got problems transplanting data from one database to another. I copied the content of the directory named after the database. However the mysql command did write the content of the new database. But the PHP couldn't connect to it. Does anybody have any idea why? Teoretically it should work. Unless the data is somehow connected to that particular database name. Which I doubt.
Yes they are readable and writeable by the user that mysql runs as. That is what bothers me. It should work right? Or do tables in MySQL save which database they belong to? I don't know.
I copied the files in a different directory. Under the mysql base directory. I have changed privileges with chown and chmod. What's good is that when running the command mysql and connecting to this new database, works great. But using this new database from PHP pages, doesn't work for some reason. I have no idea why this doesn't work.
Actually I have discovered one thing. I cant connect to the database with other user than root. Can I change some other privileges in mysql? All I have changed were the rwx privileges in linux command line. If I login as some other user, I can't connect to the new databse even in mysql. So this is probably the reason that this is not working, as I am running apache as a different user and not root as this is not recommended.
I used the command you told me and that locked me out for good. The command should change all the privileges for the user in question, right? I went into the database mysql and checked the database. All privileges to all users were set to "N". So I went and changed the privileges to users I want to have privileges. It works now. Thanks for help. I will have to review the mysql manual on commands regarding privileges for users.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.