php - MYSQL getting error when using correct syntax and also logged in as a restricted anonymous user -
i have searched on internet , asked several people @ work how resolve issue i'm ready give up... installed mysql on laptop can't log in user.
raymunds-macbook-pro:~ raymundsinlao$ /usr/local/mysql/bin/mysql welcome mysql monitor. commands end ; or \g. mysql connection id 2149 server version: 5.6.13 mysql community server (gpl) copyright (c) 2000, 2013, oracle and/or affiliates. rights reserved. oracle registered trademark of oracle corporation and/or affiliates. other names may trademarks of respective owners. type 'help;' or '\h' help. type '\c' clear current input statement. mysql> -u root -p; error 1064 (42000): have error in sql syntax; check manual corresponds mysql server version right syntax use near '-u root -p' @ line 1 mysql>
when try login tells me syntax wrong. have tried ton of different possible ways , doesn't work.
my other problem anonymous user can't access databases other information_schema , test.
mysql> show databases; +--------------------+ | database | +--------------------+ | information_schema | | test | +--------------------+ 2 rows in set (0.00 sec) mysql> use mysql; error 1044 (42000): access denied user ''@'localhost' database 'mysql' mysql>
i have tried dozens of different things , have spent 8+ hours on in past 2 days. please me out!
you're separating /usr/local/mysql/bin/mysql
, -u root -p
, these both belong on command line, should this:
/usr/local/mysql/bin/mysql -u root -p
the fact you're able in /usr/local/mysql/bin/mysql
mean you're logging in root
already, that user has no password, , you'll want set password on account (once logged in):
use mysql; update user set password=password('newpassword') user='root';
Comments
Post a Comment