Home php mysql & amp; phpmyAdmin

mysql & amp; phpmyAdmin

Author

Date

Category

I have an Open Server on my computer and with IT IT I run a webcase from which data should not be entered into its database, and in the MySQL database which is also installed on my computer. And the data is curvily recorded on the basis of the creation in phpMyAdmin which is set to Open Server.
$ mysql = new mysqli (‘Localhost’, ‘root’, ‘root’, ‘a_db’);

And these are the default settings phpMyadmin from Open Server. I changed only port at 3307.
Server: 127.0.0.1:3307 »Database: A_DB» Table: AA


Answer 1

Option 1.
In the script pages in the connection function, we will register the port of the database in which you want to write data.
For example:

$ mysql = new mysqli ('localhost: 3307', 'root', 'root', 'a_db');

Option 2.
In the PHP settings in OpenServer there is a string

mysqli.default_port =% mysqlport%

Replace it on

mysqli.default_port = 3307

and restart OpenServer.
This option will affect all scripts running on OpenServer.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions