Hey,
I'm having a problem with a PHP code I'm working on.
I'm trying to create a MySQL user and password through PHP.
I haven't been able to find a straight foward answer to this problem anywhere.
Does anyone know how to do this?
Thank you. :)
Printable View
Hey,
I'm having a problem with a PHP code I'm working on.
I'm trying to create a MySQL user and password through PHP.
I haven't been able to find a straight foward answer to this problem anywhere.
Does anyone know how to do this?
Thank you. :)
You don't "create" a MySql database with PHP. Your server has to have it enabled, and sometimes they'll have phpmyadmin with it too.
I know.
I have PHPMyAdmin, but I'm trying to create a user with a password with PHP.
Example: To create a database...$query = mysql_query('CREATE DATABASE name');
Is there a way to use something similar to the script above to do this?
there's a lot of simple tutorial regarding this topic on the search engine. First learn to how to insert a data thru mysql then learn how to query the inserted data from the dbase. Simple insert and select function :)
I guess I'm not explaining myself very well.
I'm trying to create a MySQL database User ans password using PHP.
I know how to connect to the server, but If I don't have a User or password, it does me no good.
I'm trying to create the user ans pass so I can use it to connect to the server.
This isn't done through PHP, it's done via mysql. Log in as "root" with an empty password the first time, and change that password ASAP. If you can't log in as root, then it's likely your host has set a default password. Ask them to give it to you.
Thank You.