I am trying to create a blank database with mySQL Workbench that I can connect to with php. All this is on my local machine.
Here's what I think you do.
- Click on Create New EER Model
- Create a new Physical Schemata
- Give it a name
- Save Model to Current File
- I think the name you add here is the database name?
However I can't connect to that name in php. I have been trying this with a few options and one of them worked, but I can't see what's different about the ones that don't work.
There must be something very simple I am missing here.
eg this works:
$dbname = 'test';
$db = mysql_select_db($dbname);
echo '<br>db test is '.$db;
From the main screen, select the server under "SQL Development". You'll then see a window like the one below. Click the button I've highlighted with a red circle and follow the prompts.
Make sure to add a user to the database. This can be done under "Server Administration" under the "Accounts" tab. If you're not accessing it from the same machine hosting it, make sure the allowed host is set to
%
(or your IP).