Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mark2288

macrumors regular
Original poster
Jan 11, 2006
239
4
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!
 

mark2288

macrumors regular
Original poster
Jan 11, 2006
239
4
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!
 

mark2288

macrumors regular
Original poster
Jan 11, 2006
239
4
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.