View Full Version : copying mySQL database to server
mark2288
Jul 27, 2008, 10:50 PM
So I'm trying to learn some SQL and I'm trying to copy a sample database to mySQL server and I get this error:
pu108710:~ Mark$ mysql -umysql -pPASSWORD sampleDB < mysqlsamp.sql
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'sampledb'
any ideas what i'm doing wrong? thanks in advance for any help!
lee1210
Jul 27, 2008, 10:58 PM
Your user doesn't have create database privileges. This thread addresses this:
http://bytes.com/forum/thread714421.html
-Lee
mark2288
Jul 28, 2008, 12:29 AM
thanks Lee. seems that issue is fixed. now when i do it, i get this error:
pu108710:~ Mark$ mysql -uroot -pPASSWORD DBname < mysqlsamp.sql
ERROR 1049 (42000): Unknown database 'dbname'
ideas? thanks again for the help!
AlmostThere
Jul 28, 2008, 03:49 AM
Make sure the database exists before trying to connect to it (either create it manually or put it in the script and remove from the command line)
mark2288
Jul 28, 2008, 09:09 AM
went ahead and created the database then copied the sample into it. thanks a lot for the help!
do you any of you know of any good mySQL tutorial sites/books?
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.