duanjianshen4871 2011-02-12 01:31 采纳率: 100%
浏览 173
已采纳

你如何在mySQL Workbench中创建一个可以用php连接的数据库?

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.

  1. Click on Create New EER Model
  2. Create a new Physical Schemata
  3. Give it a name
  4. Save Model to Current File
  5. 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;

enter image description here

  • 写回答

1条回答 默认 最新

  • duanchan9354 2011-02-12 01:40
    关注

    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). MySQL Workbench

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?