new features
version comparison
features: php tools
php debugger
php profiler
php frameworks
php scripts
features tour
php testing
PhpED difference
PhpED on Mac/Linux

Connecting to MySQL from NuSphere PhpED

When you program PHP code for MySQL connection you obviously need to know the schema of your MySQL tables. Nothing can be more annoying than having to leave your PHP IDE and run another program just to see your tables. Luckily with PhpED's Database Connection client you don't have to. In this tutorial you will learn how you can connect to MySQL database, browse MySQL records and manipulate them directly from PHP IDE. In this tutorial you will learn how to use DB Connection client to easily go from PHP to MySQL. This illustration shows NuSphere DB Connection Client. Php MySQL connection client in PhpED

How to connect to MySQL from PHP IDE

You can connect to MySQL database while writing PHP code using PhpED's DB Connection Client. With DB Connection Client you can:

  • Browse the data in MySQL tables
  • See MySQL databases and tables schemas
  • See MySQL privileges
  • See the structure of MySQL tables
  • Execute MySQL SQL statements
  • Copy and paste table names, field names from MySQL to PHP and much more

PhpED's DB Connection client is a must have for development of any PHP MySQL applications.

How to use PhpED's DB Connection Client for MySQL

DB Connection client is used to setup MySQL or other database account.
Setting up MySQL is very simple. You will need to:

  • Click Tools -> Accounts on the menu bar or right-click on Accounts in DB Connection pop-up menu.
  • In the Accounts dialog press New and select MySQL or right-click on Database accounts, choose New > MySQL as shown on the following illustration.
Create MySQL account in PhpED
  • Print the account name and press Enter.
  • Enter a Hostname or IP address for of the MySQL database, and enter the appropriate Port for the account (the default is 3306).
  • In the Initial Database field, enter the name of your MySQL database.
  • Enter Authentication options: Login Name and Password for your MySQL database. Select the Save Password check box if you do not want to enter the password whenever you access the database. For Example, the following illustration shows how you can setup MySQL database connection account to MySQL database running on host with IP, with initial database set to "shopcart" and login as "priv_user".
MySQL account settings in PhpED

How to use copy MySQL databases and tables names to PHP

Once your MySQL account is set up you can use it not just to browse the schema and data in the tables, but also to copy tables and databases names from MySQL to PHP code. To copy a MySQL database or table name to PHP code you need to simply:

  • Select MySQL database or table in DB Connection Client
  • Using right mouse button bring up a pop-up menu and select Copy. Look at this illustration that shows how to select and copy the name of the database "shopcart"
  • Paste the copied MySQL database or table name in the PHP code
  • You can also do the same operation by dragging MySQL database or table name from DB Connection Client directly to PHP Code
Copy MySQL database name

How to connect from PHP to MySQL

Once MySQL account is setup in DB Connection Client, you can use this account to build PHP MySQL connection using DB-Form Wizard. You can generate PHP code for PHP Forms submitting and updating records in MySQL and other databases. You can learn more about it in this DB-Form Wizard tutorial.

In this tutorial you learned about the many features of the PHP DB-Connection Client and how to use them to quickly generate PHP code working with MySQL database. Additional technical information is available from the NuSphere Forum. Download a free trial of our PHP DB Connection Client today!

 Download NuSphere PHP IDE

Download a free trial of the fast PHP EDitor and robust Integrated Development Environment for PHP.

 Buy NuSphere PhpED® now

Best PHP Editor and complete PHP IDE.
NuSphere PhpED 21.0 is available from our online store front.
"To be honest its bloody awesome, I have looked at loads of PHP editors and this is THE only one that actual works straight out of the box!!! Brilliant, well done."
Andrew Breward,
Director of Technology


Walk through NuSphere PhpED interface
PhpED video tutorial: Webservices
Learn how to add webservices to your code in less than 5 minutes (a flash demo).

 Special Team4 Offer

Get 4 copies of PhpED for the price of 3!

Optimum solution for development teams.
PhpED 21.0 Team4
Need more than 4 licenses? Contact Us for more quantity discounts, please use "Ordering/Payment issue" subject on the form.

 Dr. Dobb's

Dr. Dobb's

Dr. Dobb's Magazine covers NuSphere PhpED in New and Noteworthy section.

PhpED is a proper, world-class IDE for PHP code. It is the only IDE worth considering if PHP development is your primary job