Temper
12-31-2002, 08:04 PM
I'm just learning MySQL from a book and the first script that uses MySQL looks like this:
create database bookmarks;
use bookmarks;
create table user (
username varchar(16) primary key,
passwd char(16) not null,
email varchar(100) not null
);
create table bookmark (
username varchar(16) not null,
bm_URL varchar(255) not null,
index (username),
index (bm_URL)
);
grant select, insert, update, delete
on bookmarks.*
to bm_user@localhost identified by 'password';
with phpMyAdmin, I've learned that running
"create database bookmarks;
use bookmarks;"
must be done manually, and in the SQL query page I can add tables, therefor up to this point I pretty much have it under control.
Now comes to my problem:
phpMyAdmin won't let me use the
grant select, insert, update, delete
on bookmarks.*
to bm_user@localhost identified by 'password';
part of the script in the SQL queries table, I keep getting the error message:
Error
SQL-query :
grant select , insert , update , DELETE on bookmarks . * to bm_user@localhost identified by 'password'
MySQL said:
Access denied for user: '[removed by me]@localhost' to database 'bookmarks'.
My question, is with phpMyAdmin, how would I set up the script so I can grant access to bm_user@localhost like the SQL script from my book asks?
create database bookmarks;
use bookmarks;
create table user (
username varchar(16) primary key,
passwd char(16) not null,
email varchar(100) not null
);
create table bookmark (
username varchar(16) not null,
bm_URL varchar(255) not null,
index (username),
index (bm_URL)
);
grant select, insert, update, delete
on bookmarks.*
to bm_user@localhost identified by 'password';
with phpMyAdmin, I've learned that running
"create database bookmarks;
use bookmarks;"
must be done manually, and in the SQL query page I can add tables, therefor up to this point I pretty much have it under control.
Now comes to my problem:
phpMyAdmin won't let me use the
grant select, insert, update, delete
on bookmarks.*
to bm_user@localhost identified by 'password';
part of the script in the SQL queries table, I keep getting the error message:
Error
SQL-query :
grant select , insert , update , DELETE on bookmarks . * to bm_user@localhost identified by 'password'
MySQL said:
Access denied for user: '[removed by me]@localhost' to database 'bookmarks'.
My question, is with phpMyAdmin, how would I set up the script so I can grant access to bm_user@localhost like the SQL script from my book asks?