Very new MySQL user here. Two questions for the community.
- I seem to have created an account that I can't delete/drop.
- I can't seem to get MySQL to actually require newly created accounts to require passwords even when I specify them during creation.
I ran myisamchk
and corrupton doesn't seem to be an issue. Logs below.
mysql -u root -p
use mysql
select * from db\G;
*************************** 3. row ***************************
Host: localhost
Db: projectdb
User: project
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
Grant_priv: Y
References_priv: Y
Index_priv: Y
Alter_priv: Y
Create_tmp_table_priv: Y
Lock_tables_priv: Y
Create_view_priv: Y
Show_view_priv: Y
Create_routine_priv: Y
Alter_routine_priv: Y
Execute_priv: Y
Event_priv: Y
Trigger_priv: Y
mysql> drop user project;
ERROR 1396 (HY000): Operation DROP USER failed for 'project'@'%'
~~~~~
CREATE USER project123 IDENTIFIED BY 'project123';
Query OK, 0 rows affected (0.00 sec)
GRANT ALL ON projectdb.* TO project123 IDENTIFIED BY 'project123';
Query OK, 0 rows affected (0.00 sec)
quit;
MySQL then proceeds to let me log in without a password.
macbook-pro-8: $ /usr/local/mysql/bin/mysql -u project123
Welcome to the MySQL monitor. Commands end with ; or \g.
What am I doing wrong?