Web Hosting Talk







View Full Version : Help MY mySQL for my CP!


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!! :)

The Prohacker
06-24-2002, 03:59 PM
I don't know where some of your syntax is comming from, so maybe you should check:

http://www.mysql.com/doc/C/r/Creating_database.html

YUPAPA
06-24-2002, 04:02 PM
THANK YOU SO MUCH! :love:
I am a mySQL newbie. I use DBM mostly!

YUPAPA
06-24-2002, 07:37 PM
I found out the problem! :)
I did not flush the toilet (FLUSH PRIVILEGES) after inserting a record to the DB!

Here is the manual on how to add a user!!
http://www.mysql.com/doc/A/d/Adding_users.html

The Prohacker
06-24-2002, 07:44 PM
Congrats...

So how much is your CP going to be selling for?

YUPAPA
06-24-2002, 10:15 PM
Maybe 5 USD??!?!

Here is the page:
http://www.yupapa.com/controlpanel.shtml

AND here is a few BIG screenshots:
http://forums.yupapa.com/index.php?act=ST&f=8&t=235


Should be all done in July!

The Prohacker
06-24-2002, 10:26 PM
Is that 5 USD /month or lifetime??

YUPAPA
06-24-2002, 10:32 PM
Lifetime!
I dunno what the price should be and dunno if my CP is better than ensim or not. If it is, then it should go higher.

There is no monthly for the CP. I don't like people renting for it. PLUS Free & Unlimited Upgrades. I will add Reseller Functions to that when it is all done!

The Prohacker
06-24-2002, 10:46 PM
Nice...


Good luck with development

Warren
06-25-2002, 01:39 AM
looks like a fun project, need any help?

YUPAPA
06-25-2002, 11:45 AM
THANK YOU THANK YOU!
If I need any help, I will post here! :) :stickout