How to see errors in phpMyAdmin?

Not really a reply, more a question: how are you getting exact error-info?

I use phpmyadmin, and only get “there is a problem with your SQL syntax on line 1, Check documentation…” which doesn’t help me understand where the problem lies.

actually, the wording of the error message is “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘foo’

see the word near? that tells you exactly where the problem lies

:slight_smile:

Unfortunately, I am so new to mySQL, that that doesn’t help me at all. I would need a reference to a specific part of the documentation or something like that, which I don’t get.
When I got this error message, I was trying to use mysqldump, which apparently doesn’t work in the command line of phpmyadmin.

in which case the “near” would’ve pointed to the beginning of the “query” which wasn’t valid syntax for a query (assuming you meant the SQL tab/window)

Yes, that is where it should have pointed, but since it didn’t point that out clearly to me, I kept trying various changes to the code . . .
Since we’re on the topic, do you know of any way to get data from a remote server and insert it into a local table, that doesn’t depend on mysqldump?
If it isn’t possible, I will simply wait for the tech at the remote server to relocate the database to where I can get access, and learn mySQL while I wait :slight_smile:

mysqldump is your best option

did you know mysqldump is actually what phpmyadmin runs “under the covers” when you use the Export tab/window?

however, it does require access, and it sounds like you might not have access…

I have been reading this: http://www.tutorialspoint.com/mysql/mysql-database-export.htm where they give php-codes for everything, except of course export and import! which is what I would have liked. Are these codes absent because it isn’t possible? The sql-version of what I need is

$ mysqldump -u root -p TUTORIALS tutorials_tbl > dump.txt
password ******

first of all, you don’t need an sql version for mysqldump

and that page you linked to doesn’t mention phpmyadmin

open up phpmyadmin and go to the Export tab/window and follow the instructions…

No, that wont do it, it’s not the local database I want to export, it’s the remote one, where I don’t have phpadmin.
Long story short: I am helping a friend, who missed that she needed to upgrade from one server to another at her host. They “solved” the problem by giving her a new “empty” database and letting her blog continue reading from the old database, which is completely invisible to her in her new phpmyadmin.
We are waiting for them to fix this, but it is taking way too long, so I was hoping to find a way around the problem: the address still works from inside her WordPress, so it should be possible.

you will of course excuse me if i was misled by your first post

try heidisql – it can dump a remote database from your desktop, using the same mysqldump .sql files

Ok, I’ll try that.
Will this code work?

$ mysqldump -h remotehost.mysql -u user db_name wi1_posts > wi1_posts.sql
password passxxxx

I keep seeing code with and without spaces, with extra dashes etc. It is all very confusing . . . :slight_smile:
Do I need any ; anywhere?

no idea, i’ve never used mysqldump

what happened when you tested it?

also, i thought you didn’t have access?

you will excuse me if i’m confused, yeah?

I have direct access to other databases, which is where I am trying out different approaches, but I may have access to my friend’s database, if I can establish a connection through commandline, since phpmyadmin can’t see it.
Haven’t been able to get into ANY of my databases using heidisql: two types of error: Unknown mysql server, when I write the CORRECT server name, when I change it to something more normal-looking (but not correct) I get Can’t connect to …

I don’t know what to do :frowning: