I've been using mySQL just on my own computer hard drive while I've been learning and putting together a little app.
Now I want to try and load my app onto some web space. I've put all the client side and server side code up there and all I've got to do now is get my database files up.
The web host has phpmyadmin, so I thought I could use that, but I can't seem to work out how to do it. When I google a tutorial, the tutorial always ends up saying 'now upload the .SQL file'.
What .SQL file?
I'm looking in the mySQL folder in the Program Files on my c drive and I eventually come to a 'data' folder where there is a folder for each of the databases I have. In those folders, there aren't any .SQL files, but instead there is a .frm file for every table I've made plus one file called db.opt.
I would be very grateful if someone could tell me what I have to do with these files in order to get them up and running on my godaddy webspace.
I've looked up the mysqldump command and tried to use in the mysql command prompt, but I keep on getting the 'error in sql syntax' error.
I've tried 'mysqldump --help;', but I get the bad syntax error.
I've tried loads of different variations and followe what it said in the mysql literature, but I can't seem to get anywhere. From what you said, making a .SQL file using mysqldump is exactly what I want to do.
Hi sorry to bother you again. I've downloaded HeidiSQL and it looks great. I've exported the database that I want to export and it has produced a .SQL file. Nice!
The phpmyadmin is objecting to a line of code in the .SQL thus:
'SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI';
SET @OLD_FOREIGN_KEY_CHECKS=@@F' at line 2
the corresponding couple of lines in the .SQL file read:
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI';*/
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;*/
I'm really not sure what it means by foreign key checks. On the import page of phpmyadmin (which I have to use to upload my DB to my webspace) it gives me options to select the format of the file, so I selected ANSI (I've also tried none) and character encodeing, which I've selected Latin1 which is said something about in the SQL code (I've also tried UTF-8).
I can't see anything to do with foreign key checks. I could try deleting that line, but I don't know whether it's important or not.
Sorry to hassle you again, buit any help would be much appreciated.