YUPAPA
06-24-2002, 03:11 PM
Hi ALL :D
I have a problem making mySQL working for my CP.
I have a script to create databases and setting databases' perms for all users. The problem is after creating a database, i can't access it!
Let says I have a database called "yupapa" :stickout
My script check all the errors. If no errors found, it contacts my daemon to create a DB. It creates a directory for storing all the tables for DB 'yupapa' && insert a DB perm of 'yupapa' in the 'mysql' DB (the db) table.
Example:
if(!$db_handle->do("INSERT INTO db
(Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Grant_priv,References_priv,Index_priv,Alter_priv)
VALUES ('%','$_[0]','$CP_Config::user_name','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y')
")) {
$error_message = "Could not create database: $DBI::errstr";
} else {
$created = 1;
}
ASSUME that the DB user 'yupapa' is existed. :)
When I try to login to my DB using PHPmyADMIN, it won't let me. :mad:
Why is this? :confused: Am I missing something?
Please help me!! :)
I have a problem making mySQL working for my CP.
I have a script to create databases and setting databases' perms for all users. The problem is after creating a database, i can't access it!
Let says I have a database called "yupapa" :stickout
My script check all the errors. If no errors found, it contacts my daemon to create a DB. It creates a directory for storing all the tables for DB 'yupapa' && insert a DB perm of 'yupapa' in the 'mysql' DB (the db) table.
Example:
if(!$db_handle->do("INSERT INTO db
(Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Grant_priv,References_priv,Index_priv,Alter_priv)
VALUES ('%','$_[0]','$CP_Config::user_name','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y')
")) {
$error_message = "Could not create database: $DBI::errstr";
} else {
$created = 1;
}
ASSUME that the DB user 'yupapa' is existed. :)
When I try to login to my DB using PHPmyADMIN, it won't let me. :mad:
Why is this? :confused: Am I missing something?
Please help me!! :)
