Greetings everyone,
I'm working with a mySQL database on the on-rev server. I used the cPanel to create the initial database and I am now writing scripts to read and modify it.
Everything is working fine. But my (probably very simple) question is, where it the database file located? When I used the File Manager in cPanel, I cannot find the database anywhere. I would like to, among other things, be able to copy it and back it up.
Sincerely,
Steve Alessi
Where is the mySQL database file located?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Where is the mySQL database file located?
Steve Alessi
Associate Professor
The University of Iowa
Associate Professor
The University of Iowa
Re: Where is the mySQL database file located?
Hi Steve,
Usually, the database server is either on a different machine or on the same machine but out of reach. Because all accounts on the server use the same database engine, nobody should have access to the engine and the location where it's files are located, because if one of the users did have access, s/he could cause the other users big problems. The only way to access the files is through MySQL syntax.
You can make a backupup by opening phpMyAdmin, selecting a database and creating a dump in the Export tab.
Kind regards,
Mark
Usually, the database server is either on a different machine or on the same machine but out of reach. Because all accounts on the server use the same database engine, nobody should have access to the engine and the location where it's files are located, because if one of the users did have access, s/he could cause the other users big problems. The only way to access the files is through MySQL syntax.
You can make a backupup by opening phpMyAdmin, selecting a database and creating a dump in the Export tab.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Where is the mySQL database file located?
Hi Mark,
Thanks! That makes sense.
Since you obviously know about MySQL, perhaps I can ask another question. I can do various operations on a databased in my LiveCode program (add tables, structure tables, add data, make queries). But I cannot execute a CREATE DATABASE command. The error message says I do not have permission for that database, which I guess makes sense given that it does not exist yet. So far, I can only create databases in the cPanal. Is there some syntax that will allow my LiveCode program to create a database, e.g., by specifying permissions at the same time I create it?
Thanks again,
Steve Alessi
Thanks! That makes sense.
Since you obviously know about MySQL, perhaps I can ask another question. I can do various operations on a databased in my LiveCode program (add tables, structure tables, add data, make queries). But I cannot execute a CREATE DATABASE command. The error message says I do not have permission for that database, which I guess makes sense given that it does not exist yet. So far, I can only create databases in the cPanal. Is there some syntax that will allow my LiveCode program to create a database, e.g., by specifying permissions at the same time I create it?
Thanks again,
Steve Alessi
Steve Alessi
Associate Professor
The University of Iowa
Associate Professor
The University of Iowa
Re: Where is the mySQL database file located?
Hi Steve,
If I run MySQL from the terminal to manage my local MySQL database, I can create databases using MySQL syntax. You can't do this on a server, because if a hacker manages to figure out how your website works, he might use SQL injection to completely delete your databases or create new ones with e.g. stolen credit card numbers. Your ISP (and AFAIK every ISP) assumes that you want to keep control over your databases and don't want to be exposed to such risks. That's why you didn't get sufficient user permissions to create databases from PHP or LiveCode. It is very probable that while you manage your database from CPanel, CPanel logs in as a different user with sufficient permissions to create and delete databases. Seriously, this simple limitation makes your databases infinitely much more safer.
Kind regards,
Mark
If I run MySQL from the terminal to manage my local MySQL database, I can create databases using MySQL syntax. You can't do this on a server, because if a hacker manages to figure out how your website works, he might use SQL injection to completely delete your databases or create new ones with e.g. stolen credit card numbers. Your ISP (and AFAIK every ISP) assumes that you want to keep control over your databases and don't want to be exposed to such risks. That's why you didn't get sufficient user permissions to create databases from PHP or LiveCode. It is very probable that while you manage your database from CPanel, CPanel logs in as a different user with sufficient permissions to create and delete databases. Seriously, this simple limitation makes your databases infinitely much more safer.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode