MySQL Server





MySQL is an open source, relational database management system that runs as a server providing multi-user access to a number of databases. Acquired by Oracle in 2009, it is frequently used in combination with PHP installations, powering most of the WordPress installations.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am trying to to provide basic information on an organization like : "Currently there are (variable) number of members".  I have no problems building tables or getting the queries to work in mysql.  I just can't transfer the variables into the php output.
[eBook] Windows Nano Server
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

My Access datbase Front-end will not let me enter data in fields while Mysql is hosted by my Godaddy site, but works flawless connected to localhost.
Is there some trick to getting the translation working? "AS" in the query below fails...

Here is the Query:

SELECT c.FirstName AS first_name,
             c.LastName AS last_name,
             c.Company AS company_name,
             r.RepID AS rep_id,
             r.RepName AS rep_name,
             c.CustomerID AS om_customer_id
FROM Customers c
LEFT JOIN RepManufacturer r ON r.RepID = c.Integer5
WHERE (c.FirstName LIKE '%todd test%' OR c.LastName LIKE '%todd test%' OR c.FullName LIKE '%todd test%' OR c.Email LIKE '%todd test%' OR c.Phone LIKE '%todd test%' OR c.Company LIKE '%todd test%')

Which gives me this array result on our Unix Ubuntu web server.. so basically it just totally ignores the ‘AS’ and retains the orginal name

Array ( [0] => Array ( [FirstName] => Todd testing [LastName] => Sprind testing [Company] => OurCompany [RepID] => 658 [RepName] => Dan The Man [CustomerID] => 2171 ) [1] => Array ( [FirstName] => todd TEST [LastName] => sprind TEST [Company] => [RepID] => [RepName] => [CustomerID] => 2172 ) [2] => Array ( [FirstName] => TEST Todd [LastName] => TEST Sprind [Company] => [RepID] => [RepName] => [CustomerID] => 2242 ) [3] => Array ( [FirstName] => test todd [LastName] => test spri [Company] => residential [RepID] => [RepName] => [CustomerID] => 2702 )
Hello ,
I am setting up mysql replication between a master and slave and I get the error "error connecting to master".

Before i have this error 1045, i use this solution tutorial:
After that have nothing change.
I tried to change my password form the slave-user but nothing change.

I have in the my.ini datei on slave the id=2 and on master the id=1

 i have the user for the replication in the php-admin and i gave him the right for the replication.

The Port: 3306 is open:

Starting portqry.exe -n -e 3306 -p TCP ...

Querying target system called:

Attempting to resolve IP address to a name...

IP address resolved to


TCP port 3306 (unknown service): LISTENING
portqry.exe -n 11.11..1.11.1 -e 3306 -p TCP exits with return code 0x00000000.

How i can test the rights best about the user slave?

* 1. row *
Slave_IO_State: Connecting to master
Master_User: slave_sync
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000005
Read_Master_Log_Pos: 8127820
Relay_Log_File: relay.000024
Relay_Log_Pos: 4
Relay_Master_Log_File: mysql-bin.000005
Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Replicate_Do_DB: db_01
Last_Errno: 0

I am getting following error while starting phpmyadmin.

 MySQL said: Documentation
#2002 - Connection refused — The server is not responding (or the local server's socket is not correctly configured).
mysqli_real_connect(): (HY000/2002): Connection refused
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): Connection refused
I have a new Wordpress installation on IIS 8.5 on Windows Server 2012 R2 and it working.  I added PHPMYADMIN to manage the DB's and I am getting this error when I login to PHPMYADMIN.

MySQL 5.1
PHP 5.6
Wordpress 4.8

Warning in .\libraries\dbi\DBIMysqli.php#574
 mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given


 .\libraries\dbi\DBIMysqli.php#574: mysqli_real_escape_string(
 boolean false,
 string '_',
 .\libraries\DatabaseInterface.php#2735: PMA\libraries\dbi\DBIMysqli->escapeString(
 boolean false,
 string '_',
 .\libraries\navigation\nodes\Node.php#449: PMA\libraries\DatabaseInterface->escapeString(string '_')
 .\libraries\navigation\NavigationTree.php#289: PMA\libraries\navigation\nodes\Node->getData(
 string 'databases',
 integer 0,
 string '',
 .\libraries\navigation\NavigationTree.php#847: PMA\libraries\navigation\NavigationTree->_buildPath()
 .\libraries\navigation\Navigation.php#45: PMA\libraries\navigation\NavigationTree->renderState()
 .\libraries\Header.php#425: PMA\libraries\navigation\Navigation->getDisplay()
 .\libraries\Response.php#260: PMA\libraries\Header->getDisplay()
 .\libraries\Response.php#273: PMA\libraries\Response->_getDisplay()
 .\libraries\Response.php#432: PMA\libraries\Response->_htmlResponse()
I am developing a small friend contact list for my personal website, wherein I want my friends to update their personal details, like address, city, phone number, email address etc. after login.
There are fields like address, city, phone No., email, which is editable and fields like Names are not editable.
login.php-->mainpage.php [where all the fields are getting displayed in column-wise like:
      First Name:
      Last Name :
      Address     :
      City             :
      Phone        :
      Email         :

To edit or update the details, I create a link 'EDIT' Button and link it to a page 'edit_profile.php', where I want my friends to update their latest information. But, the code is not working - I am developing this myself with the help of Internet. May I request you to kindly look into this and correct, it would be a great learning experience for me.

[edit_profile.php] is attached below:
$first_name = $_SESSION['first_name'];
$last_name  = $_SESSION['last_name'];
$Fri_Add1  = $_SESSION['Fri_Add1'];
$Fri_City  = $_SESSION['Fri_City'];
$Fri_Phone1  = $_SESSION['Fri_Phone1'];
$Fri_Email1  = $_SESSION['Fri_Email1'];

header("Location: ../login.php");

include "database/friends.php";
$sqlInfo = mysql_query(" select * from `friends`");


include 'database/friends.php';
$updateMessage = trim($_POST['updateMessage']);
$first_name = …
Have a problem getting a stored procedure to work in Adminer
This fails on the first line
Comments / tips very welcome

DECLARE @new_project_id int;
DECLARE @current_snapshot_id int;
DECLARE @new_snapshot_id int;

insert into project select * from project where project_id=@in_project_id
SET @new_project_id = last_insert_id()
for each row in (select * from snapshot where project_id=@in_project_id)
  insert into snapshot values(
 SET @new_snapshot_id = last_insert_id()
  insert into layer select new_snapshot_id, * from layer where snapshot_id =row.snapshot_id

Open in new window

I  have developed free radius management system locally.
but now in my job they asked me to make this system to be selling in a cloud
ie. every user around the world can access our management system from the cloud
he must register a new account in our system and determine his database
that means every user has a different database with same free radius server
my first problem is when a new user had registered to our system his database information will go in SQL.conf file but as we know that free radius does not take his new configuration till restart so I must restart free radius for every new user and interrupt the others work.
the other question is when there are many users with their database for example if I have 100 users and for every user, there is one database that means free radius must connect to 100 different databases  is this will make free radius working slowly or not
I hope I explained my problem clearly
            <WAC>Test </WAC>
            <WAC>Test </WAC>
            <WAC>Test </WAC>
            <WAC>Test </WAC>
Three Reasons Why Backup is Strategic
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

I would like to export the posts from an old wordpress site.  I only want the posts, and I want them to override the ones in my new site.  So what do I do in MySQL to export the old posts and then import them into the new table.
Is is as simple as selecting the table and then importing it into the new wordpress site.  I don't want to mess anything on the new site (except the posts of course@)
I hope someone can help me do this one please?
Thank you,
please look attached file.i need to print the data individulaly
i created two tabular forms in phpmyadmin those two are linked data is fetching here the problem is while fetching the data i'm getting the employess data continusly.
for example : i created two tables one is employee family and other one is employee personal.while fetching the data all employees family details are fetching at a time similarly personal details comming like that but i want in order
<h3 style="font-size:10%;"><h3 style="text-align:center;color:black;">EMPLOYEE INFORMATION</h3>
 $dbhost = "localhost";
 $dbuser = "GCSADMIN";
 $dbpass = "123456";
 $db = "employee_db";

    $conn = mysql_connect($dbhost, $dbuser, $dbpass,$db);

   if(! $conn ) {
      die('Could not connect: ' . mysql_error());

   $sql = "SELECT EmployeeID,FirstName,MiddleName,LastName,FatherName,SpouseName,MotherName,DOB,Age,BloodGroup,MaritalStatus,Gender,ContactNumber,EmergencyContactNumber,Email,DateOfJoiningatGemini,TotalYearOfExperience,ReleventYearOfExperience,PANnumber,PassportNumber,UANnumber,AadharNumber,PresentAddress,PermanentAddress FROM employee_information";

   $retval = mysql_query( $sql, $conn );
   if(! $retval ) {
      die('Could not get data: ' . mysql_error());
   echo "<table border='5px solid block', align='center', width='50%', padding='12px 20px' >";

   while($row = mysql_fetch_assoc($retval, MYSQL_ASSOC)){


Open in new window

Hi Expert:
I've lost ability to connect to MySQL data, the error message as attached. Can I recover data from ibdata1, ib_logfile1, ib_logfile0
on an other machine.
include "database.php";
$sql1 = "SELECT First_Name, Last_Name, Email , Password FROM register WHERE Email = '$_POST[email]'  "; 
$sql2 = "SELECT First_Name, Last_Name, Email , Password FROM register WHERE Phone = '$_POST[phone]'  "; 
$query1 = mysqli_query($conn,$sql1);
$row1 = mysqli_fetch_assoc($query1);
$query2 = mysqli_query($conn,$sql2);
$row2 = mysqli_fetch_assoc($query2);
if(!empty($row1) && !empty($row2))
	echo '1';
	if(empty($row1) && !empty($row2))
		echo '2';
	if(!empty($row1) && empty($row2))
			echo '3';
	$otp = mt_rand(100000,999999);
	$hash = md5(mt_rand(0,1000) );
	$pass = md5($_POST["password"]);
	$sql ="INSERT INTO register (First_Name, Last_Name, Email, Password, Phone,Otp,hash) VALUES ('$_POST[fname]','$_POST[lname]','$_POST[email]','$pass','$_POST[phone]','$otp','$hash')";
	$query = mysqli_query($conn,$sql);
		$_SESSION['login_user']=ucfirst($_POST["fname"])." ".ucfirst($_POST["lname"]);
		$to = $_POST["email"];
		$subject = "Email Verification";

		$message  = '<html><body>';
		$message .= '<h1 style="color:#128c7e;">Hello '. ucfirst($_POST["fname"]).' '.ucfirst($_POST["lname"]).'!</h1>';
		$message .= '<p style="color:#080;font-size:18px;">Thanks for signing up!
Your account has been created, you can login with the following credentials after you have activated your account by pressing the url below.<br>

Open in new window

hi experts my code is like that check on table1 if textbox1.Text exist if yes go to table2 and check if textbox1.text exist and if textbox2.Text exist if they exist open the form if not insert them and open the form and if textbox1.text exist and textbox2.text doesn't exist close form

i wrote this :

MySqlConnection con = new MySqlConnection(connectionString);
            i = 0;
            MySqlCommand cmd = con.CreateCommand();
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "select * from informat where u_ser = '" + metroTextBox2.Text + "' ";
            DataTable dt = new DataTable();
            MySqlDataAdapter da = new MySqlDataAdapter(cmd);
            i = dt.Rows.Count;
            int userial = metroTextBox2.Text.Length;
            if (userial >= 5 || metroTextBox2.Text == null)

                MySqlConnection conet = new MySqlConnection(connectionString);
                MySqlCommand cmsd = conet.CreateCommand();
                cmsd.CommandType = CommandType.Text;
                cmsd.CommandText = "select * from alred  where u_ser = '" + metroTextBox2.Text + "'and u_ip =  '" + textBox1.Text + "'";
                DataTable ddts = new DataTable();
                MySqlDataAdapter ddas = new MySqlDataAdapter(cmsd);


Open in new window

I Created a form submitting data in a MySQL database

Now I try to get the following done.

To fill automatically some of the fields depending on the values in a previous field.  

Example: i have 3 fields

Firstname: ......
LastName: ......
UserName: .....
address: ......

All information is known in the db so when typing in the FirstName the LastName and  Username should automatically come up and be filled.


I don't know if what I'm asking here is a big deal or not ... but how do I present to users a spinning wheel on screen (or some other time of visual moving graphic) to indicate a process is being actioned? A bit like when your waiting for a payment to process at checkout.

In our environment all other jobs runs just fine but two jobs fails with ERROR" executed as user : \sqlserver [SQLSTATE HY000] (Error 596) "  then it fails the Cluster with Error

Cluster resource 'DWHAOGRP01' of type 'SQL Server Availability Group' in clustered role 'DWHAOGRP01' failed.

Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart it.  Check the resource and group state using Failover Cluster Manager or the Get-ClusterResource Windows PowerShell cmdlet.
i have been looking everywhere but couldnt find any answer - tried rebuilding indexes broken the replica for that particular DB and also changed the user which executing this job .

Noting worked , please Help !!!
Dear Experts

We are having SugarCRM runs on php, apache and mysql 5.6.  we have a module called inventory which has project, block as modules in SugarCRM , can you please help me how to take schema in each table with top 10 commands and this to be provided to the developer. please help me with steps and by taking schema of every table with top 10 commands will it affect instance as it is production server, and how to take this through the  shell login with mysql root and also is it possible to achieve this though phpmyadmin. please provide me the steps , thanks in advance.
10 Questions to Ask when Buying Backup Software
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

I have a web page that is divided into different sections. Each section has to show different results. These results are gotten from the database and from two different tables. The sections are gotten from a different table whereas the names are gotten from another table using the section as a secondary key

This is the expected result from the database
Section A
1 Adam Smith
2 John Smitherine
3 Mart Michael

Section B
1 John Doe
2 Bill Moe
3 Jane Bo

Section C
1 Jerome Park
2 Billy Zark
3 Marto Bark

So I came up with this
$section = $connect->query("SELECT section FROM Main_Section ");
while ($row = $section->fetch_array(MYSQLI_BOTH))
    $section_name = $row["section"];
    $name_result = $connect->query("SELECT id, firstname, lastname FROM Names WHERE section ='".$section_name."'");       
          while ($row1 = $name_result->fetch_array(MYSQLI_BOTH))
        $first_name = $row1["firstname"];
      $id = $row1["id"];      
      $last_name = $row1["lastname"];       
      $name_data  .= '<div>'.$id.' <div><h3>'.$first_name.' '.$last_name.'</h3></div></a></div>';                
$grand_data .= '<div class="box"><div class="sub-box"><h2>'.$section_name.'</h2></div>'.$name_data .'</div>';

on the html, I post the data by using

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <title>My Title</title>
  <meta name="description" content="My description">

  <?=$grand_data ?>

Here's the …
I work in php and mysql. In the site i have a search box. For Example: when i putting a skills i get around 100 data i further refine by putting in another skills   and the 100 is reduces  to 75. from 75 i further reduces and this process goes on till i have around 10 or 15 data.

This is a my search form.

if u have any example or any link please give me and help me.
Thank You
Hi, I'm trying to set up a website template with OpenCart integrated on my hosting server. It gets to step 3 and when I submit it gives a blank page. I switched on error reporting and I get this:

Fatal error: Uncaught Exception: Error: Access denied for user 'flowers'@'%' to database '614'<br />Error No: 1044<br /> CREATE DATABASE IF NOT EXISTS `614` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; in /var/www/ Stack trace: #0 /var/www/ DB\MySQLi->query('\nCREATE DATABAS...', Array) #1 /var/www/ DB->query('\nCREATE DATABAS...') #2 /var/www/ ModelInstallInstall->database(Array) #3 /var/www/ Loader->{closure}(Array) #4 /var/www/ Proxy->__call('database', Array) #5 /var/www/ ControllerInstallStep3->index() #6 /var/www/ Action->exe in /var/www/ on line 40

Any ideas on what's going on here would be appreciated.
I am writing an application that will extract the history files and allow the user to view it in a table or DataGridView. The issue I am having is converting the timestamps when the data is displayed. There are tons of articles about it, but not of them seem to work. It is possible that my skill level is not high enough to understand them.

At the moment I dump the data into the grid view, should I convert it prior to or after?

We are need in copying all the user databases along with logins, permissions and roles from Prod to Dev server from Mysql 5.0 version to 5.7.

Being a MSSQL Server DBA, I'm having basic knowledge on Mysql which is hosted on linux server.

With the help of TSM team, all the user databases are copied from Prod to Dev server successfully and I can able to see all the databases on Dev server. Now I been stuck with copying the logins, permissions and roles.

What is the best way to copy all the logins, revised few blogs and came to know by default there will be mysql database which holds all the logins and permissions. Shall I restore the mysql database , will that work out?

Need urgent help to get this done asap and it will be greatly appreciated. Thanks.

Venkat Kokulla
If I configre MySql for remote access (using the server ip)  will it still work as localhost?

MySQL Server





MySQL is an open source, relational database management system that runs as a server providing multi-user access to a number of databases. Acquired by Oracle in 2009, it is frequently used in combination with PHP installations, powering most of the WordPress installations.