
|
View Full Version : Mysql Manager
Alan - Vox 10-19-2001, 01:42 PM I have created a php script thats lets hosts and their clients easily create mysql databases and users, similar to that of cpanel.
You can try it at
http://66.54.169.113/mymanager/
username=root
password=root
I have now intergrated phpMyAdmin into this, although i have disabled it for the root user so you dont break the demo :)
After creating a user you can click on the login link and login with that user to create/delete databases.
I was thinking of selling it for around $70 per server but i havent decided the exact price yet.
If anyone is interested in buying it just post here.
P.S
Let me know what you think of the script and the price
Alan - Vox 10-20-2001, 12:16 PM I will sell it for $30 to the next 5 people
Starhost 10-20-2001, 01:07 PM A programm such as this is written within the hour so it isn't worth spending that much money. But that's just mine opinion.
Further the program works great, as far as I could see no bugs or errors.
Alan - Vox 10-20-2001, 01:11 PM A programm such as this is written within the hour so it isn't worth spending that much money
If you think you could write that in an hour then maybe you should start giving programming lessons.
Starhost 10-20-2001, 01:34 PM Ok how I would setup this program is as following:
-Create a db called users_mysql
-Then create a frond-end
-this frond-end has the ability to add users and a setof mysql db's
-also it has the ability for users to login create their db's and delete/modify their db's
-That's all
The Mysql Structure I would use is:
CREATE TABLE user_mysql (
id int DEFAULT '0' NOT NULL auto_increment,
user varchar(75) NULL,
password varchar(75) NULL,
nr_db int NULL,
used_db varchar(75) NULL,
PRIMARY KEY (id),
UNIQUE ID (id)
);
For the field used_db is stores: db_name:login:pass/db_name1:login:pass/db_name2:login:pass/db_name3:login:pass/db_name4:login:pass etc.
That's all you have to do. I can do it within the hour, I know that for sure and I can tell you that I only know PHP for 1 year and never followed any cursus or whatever. So when I can do it everybody can.
[edit] spelling error
Alan - Vox 10-20-2001, 03:18 PM All you have done is stated the structure of a database you could use and state what my program does and has no relevence on how long it would take to code.
It took me somewhere between 10-25 hours to write this script.(I didnt take logs of the hours i was working on it.) and i dont appreciate someone saying that it could be done in an hour. In fact it would probably take you over an hour just to copy my program never mind actually writing and testing it.
If it would only take an hour to write why arent there any scripts that do this? If you dont think its worth $30 maybe you should go and ask a company for a quote to write one for you and then see how much it costs!
Starhost 10-20-2001, 03:36 PM I'll start writing a copy of your program, but with my coding Monday and I'll log the time I'm spending on it. Further more why should I let this program write by a company if I can write it myself within an hour??
Why such programs doesn't exsist at the moment I don't know. I think because most people use Control Panels which have features like this already in it. But that's my opinion. What I wanted to state with this all is that I just don't think the program is worth that much money. I'm not saying that the program isn't good.
CWDSolutions 10-20-2001, 04:19 PM Just because I was browsing by and seen this post I figured I
would add my 2 cents.
Starhost you seem to have forgotten a few featires for the script you are talking about.
1. There are 2 other tables that you will need to update:
- mysql.db
- mysql.user
The above process depending on the skill level of the programmer
can be shortened by using a joins, but unless you are familar you
more than likely will make to many db query's which does use system resources.
2. You will then need to restart mysql in order to have the changes
take effect, unless you DO NOT want the user to be able to access the database using the username and password they have created.
3. Writing a script like the one SplashHost.com has written isn't
just about writing it there are other considerations that Starhost
has forgotten about:
- SECURITY
- Testing
- Testing
- Testing
- and finally Testing
The testing is not just to make sure it is bug free but also to make sure
it is optimized and there are no security holes.
You cannot just write a script and say "Hey I made this script and
want you to add it to your servers, don't mind the fact that I made it in an hour, never tested it, and am not 100% sure if there are security holes or not."
Please be sure anyone that is making a program using PHP and is
setting it up for a WHOLE server you check for security leaks.
NOTE to SplashHost.com:
***************************************************
I am nmot sure if you are checking for this or not but here is something
I noticed in your program thatr could be a potential security hole:
You are sending the "DELETE" information using "GET"
http://domain.com/mymanager/manager.php?del=test&username=root&password=root
What if I was to change the above information to:
http://domain.com/mymanager/manager.php?del=mysql&username=root&password=root
I am in no way saying your program is not good, just pointing out
something I noticed.
***************************************************
Regards,
Ray
Alan - Vox 10-20-2001, 04:51 PM Thanks for pointing that out CWDSolutions but ive already taken care of that, users can only delete databases they have created :)
Alan - Vox 10-20-2001, 04:54 PM I'll start writing a copy of your program, but with my coding Monday and I'll log the time I'm spending on it.
I think programming one just to prove a point would just be a waste of time if you ask me.
Starhost 10-20-2001, 04:55 PM To update mysql.db and mysql.user you can just use:
And say it yourself this isn't hard is it?
But the testing would take most of the time. But such a script will work within the hour. I'm almost sure of it. And Will test it Monday if I can make it within 1 hour.
$user = "root";
$database = "mysql"; #mysql db
$password = ""; #mysql root password
$host = "localhost";
$dbserver = "localhost";
MYSQL_CONNECT($host,$user,$password) OR DIE("Unable to connect to database");
@mysql_select_db("$database") or die("Unable to select database");
//mysql_query("CREATE DATABASE $crdatabase") or die("Bad query1: ".mysql_error());
mysql_query("INSERT INTO user (Host,User,Password,File_priv) VALUES('localhost','$account',password('$passwd'),'Y')") or die("Bad query2: ".mysql_error());
mysql_query("INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Alter_priv) VALUES('localhost','$crdatabase','$account','Y','Y','Y','Y','Y','Y','Y')") or die("Bad query3: ".mysql_error());
$result = mysql_query("FLUSH PRIVILEGES");
Starhost 10-20-2001, 04:57 PM Originally posted by SplashHost.com
I think programming one just to prove a point would just be a waste of time if you ask me.
I don't think it's a waste of time. I'm saying I can do it within the hour, so I'll prove it. If I say something, I'll do it. Else I have to shut up. It's as simple as that.
Alan - Vox 10-20-2001, 05:02 PM You wont be proving it anyway, how will we know you done it within an hour?
Starhost 10-20-2001, 05:13 PM If you would like, you can open a shell accoutn on your server and give me only access between a specified hour. But to be really honest the only way you can know for sure is to come overhere and sit besides me. I live in the Netherlands (Holland), so come over if you would like to.
Alan - Vox 10-20-2001, 05:25 PM Or if you can have a script up an running an hour from now then maybe ill believe you, or you say your going to code it on monday but will be working on it over sunday.
Starhost 10-20-2001, 05:36 PM Ok, I'm starting now. Please don't mind the layout, because I'm going to program not designing.
Starhost 10-20-2001, 06:17 PM Ok, I have to admit I can't write the p[rogram within the hour but within 2-3 hours It will be ready. But know I'm going to sleep, because it's a quarter past noon here in the Netherlands.
Alan - Vox 10-20-2001, 06:21 PM The point was that you said you could do it an hour, you dont need to go and prove you can make a similar program.
dektong 10-20-2001, 09:04 PM Originally posted by Starhost
I'm going to sleep, because it's a quarter past noon here in the Netherlands.
People sleep a qurater past _noon_ in Netherlands? Woa, what an enjoyable life :D
cheers,
:beer:
|