0

Someone sold us a script and not sure if it's working so I need to test it before it's too late however I'am getting the error "#1044 - Access denied for user 'root'@'localhost' to database 'information_schema'"

I wasn't able to put the code entirely so here is the pastebin link : http://pastebin.com/P4dPRHaf

I searched but couldn't really find a lot of help since i don't have experience on those stuff .note that I'am using Wamp server & getting this error when I try to import the .SQL file on PHPmyAdmin I guess that information_schema already exists on the database however not sure what part should I delete etc...

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user3832856
  • 173
  • 3
  • 12
  • 1
    In a default mysql installation the information_schema indeed already exists you could alter your sql file 'CREATE DATABASE IF NOT EXISTS `information_schema`' – Daan Jun 18 '15 at 10:10
  • #1044 - Access denied for user 'root'@'localhost' to database 'information_schema' same error when I did that – user3832856 Jun 18 '15 at 10:25
  • You may find that you get that a lot more times - the code appears to recreate the information_schema database which should already be there. Try deleting everything from the first CREATE DATABASE down to CREATE DATABASE `raffle` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; which I guess is the database you want to create. – PaulF Jun 18 '15 at 10:30
  • I copied all from CREATE Database to the end and I got this error now : #1231 - Variable 'character_set_client' can't be set to the value of 'NULL' – user3832856 Jun 18 '15 at 10:35

1 Answers1

2

It's saving you from yourself.

You should not be running statements on the info schema db (unless you REALLY know what you're doing). The database serves as a "meta" repository that dictates how the server operates. Chances are that you have no need to touch it and you'll likely brick your server if you do.

ToddJCrane
  • 1,587
  • 1
  • 14
  • 22
  • then what to do ? check my comment on the first post . even if I try to only create Raffle database , I get an error . #1231 - Variable 'character_set_client' can't be set to the value of 'NULL' – user3832856 Jun 18 '15 at 11:31
  • Fixed it for you, but check to see if it worked anyway... Try "SHOW TABLES IN raffle;" first. If that doesn't work... http://pastebin.com/ZsqgTYz5 – ToddJCrane Jun 18 '15 at 13:19