I am new to MySQL/PHP and have just finished transcribing a site. I have no idea where to start when it comes to uploading a MySQL database. Can anyone push me in the right direction?
I have converted a site from MS Access/ASP to MySQL/PHP. I have already converted the .mdb to a MySQL database. How do I go about getting my database to the server? I can upload the PHP files to the site but dont know what to do with the MySQL database. Until now I have been doing all the testing of the site on my local machine.
Do the OSes of the development machine and the production machine match?
Since MySQL stores a database in a directory and tables in sets of files, it's possible to create a database on the destination server then copy the table files from the source server into the destination server's database's directory. But this does not work well if, for example, the source database is Win32 and the destination database is a unix-like OS.
Barring that, you can use something like mysqldump to dump a database into a set of SQL commands that will create and populate the database and tables.
ok.
so i have created the .sql file. I thought I would try to put it into my local machine as a new database just to try it. However, I am unable to get it to work. I keep getting a syntax error. Any thoughts as to what I am doing wrong?
CES
By the way, thanks for all your help thus far. You have posted to a number of my threads as i began learning MySQL/PHP two weeks ago.
and it says to: mysql database < backup-file.sql to read into the database but it doesnt seem to work for me..I assume that 'database' is the destination database and 'backup-file.sql' is my dump file..any idea..
The easiest way i did mine (I had to do the exact same thing)... I uploaded PHPMYADMIN onto the server and i used it to upload the new database since I didn't have access to the data folder where all the databases are stored.
HondaSir..
I just uploaded phpmyadmin to my server. In the config.inc.php, I need to change the localhost, Database user and the password...is that all?
I tried phpMyAdmin for this, but the .sql file was apparently bigger than some setting (probably either php.ini or system user limits) allowed. It would upload for a minute, then give a 'no sql query' error.
Ya,
I had the same problem....but i copied and pated one table at a time and it worked 'on my local machine'. I cant seem to get it to work on the server. I am open to suggestions about that. Can i do it your way flugh even if i do not own the server? if so, please explain.
I have SELECT, INSERT, UPDATE, DELETE, CREATE, DROP privileges in the MySQL priv table (no ALTER, a bigger pain than I anticipated when sending my support request email ). Works like a champ for me, just CREATE a blank database, then do the 'mysql < file.sql' thing.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.