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 have a username and password for the real estates agent theysaid I have to call the web service and get a response but
How can I integrate to my theme in wordpress if u want to help me will be good or I can hire you too but I like to learn anny I wait for your answer guys thank you
I am connecting to MySQL server using mysql command line utility.  Server version: 10.2.6-MariaDB-log.  

I am loosing connection after about 10 min executing my stored procedure.  Stored procedure created a cursor, iterates it, and does something.  It is not stuck at the time connection is lost.  What setting is causing this?  How can this timeout be increased?

Please note, I am not running my stored procedure in MySQL Workbench.
After executing two seperate 'WITH' statements, I can show them seperately and they will show the correct data.
However, there seems to be no way to combine the two results in one table to the user.

UNION gives you a timeout.
You cant seem to create a temporary table to append to, because the recursive WITH seems to not allow this.

WITH recursive temp as (
   SELECT current_template, current_iteration, parent_template, parent_iteration, tkey, val
   FROM templatevalues
   WHERE tkey='linnumber' AND val='1' AND guid='ffb7e0cd-5dff-4b83-be88-ebf66d5557be' -- this is the starting point
   SELECT c.current_template, c.current_iteration, c.parent_template, c.parent_iteration, c.tkey, c.val
   FROM templatevalues c
   JOIN temp p ON p.parent_template = c.current_template AND p.parent_iteration = c.current_iteration AND guid='ffb7e0cd-5dff-4b83-be88-ebf66d5557be' -- this is the recursion
temp2 as (
   SELECT current_template, current_iteration, parent_template, parent_iteration, tkey, val
   FROM templatevalues
   WHERE tkey='linnumber' AND val='1' AND guid='ffb7e0cd-5dff-4b83-be88-ebf66d5557be' -- this is the starting point
   SELECT c.current_template, c.current_iteration, c.parent_template, c.parent_iteration, c.tkey, c.val
   FROM templatevalues c
   JOIN temp2 p ON c.parent_template = p.current_template AND c.parent_iteration = p.current_iteration AND guid='ffb7e0cd-5dff-4b83-be88-ebf66d5557be' -- this is the recursion
Looking for advice on moving forward or the actual steps.

Current SETUP:  Windows Server 2008R2 Failover Cluster with 2 Physical Nodes and 1 Physical SAN
Future SETUP:  Windows Server 2016 Failover Cluster with 2 Virtual Nodes and 1 SMB3 FileServer with the Database.

This is a small db only 60GB running MySQL5.6

My Questions is my future setup the best idea?  I want to move them away from physical and goto virtual and at the same time install new 2016 Servers.  It looks like in the past (I wasn't here) they just built a MS Win2k8 Cluster and then installed the MySQL service and let Windows manage that.  When I goto MYSQL now it has cluster version and enterprise and 7.5!  So which setup is best?

I would perfer Windows Server 2016 and virtual solutions.  Does anyone know which is best setup for small 60GB database with Frontend Tomcat application and what are the steps to setup?  Is it the same as standup the cluster and then install the MySQL standalone service?  

Thank you for your time and help.
The current setup seems like this:

I have a table of data that looks like the following

Storage_Container Folder DataField1 DataField2
Storage1, Folder1, Data1, Data2...

So from above I need to make sure that all the data field columns DataField1 and DataField2 have an entry for each storage_container above as well as for each Folder.
Also note that the data fields match as well.

I don't know if this is possible but is there some MS T-SQL to perform this type of validation.
Thanks Ward
my database using Xampp control panel for mysql using phpmyadmin tool. so how do i install my database over microsoft azure cloud?
please provide the php code with mysql query to hide the message in an image using steganography
I need a wocommece query which can return the following:

Product ID, Product Name, Product URL, Url of Featured Image,
where wp_postmeta.meta_key = _wc_dispatch_days and wp_postmeta.meta_value > 0
stock level > 0

the meta key _wc_dispatch_days is a custom key, and it hold values, for which i need records with values >0
Hello Experts,

How would I insert an array of data into a MySQL database, using PHP? I am able to successfully enter one row of data into each table (renters and rental_agreement), but I get confused when a renter rents more than one car seat. How do I in essence duplicate all of the necessary information into the rental_agreement table, but have the serial_number change to the next number in the series of seats rented?

Attached are three images depicting two tables and one example entry from my database.

Rental Agreement Structure
Renters Structure
Rental Agreement Example
I have the following code which inserts data into the renters table. The last_id is then inserted into the rental_agreement table. For the time being, I am using test data and not the $_POST data:

$dl_street="123 SESAME STREET";
$dl_unit=" ";
$current_street="123 SESAME STREET";
$current_unit=" ";

$sql = 'INSERT INTO `renters` 
(renters_first_name, renters_last_name, 
renters_dl_number, renters_dl_street, renters_dl_unit, renters_dl_city, renters_dl_state, renters_dl_zip,
renters_current_street, renters_current_unit, renters_current_city, renters_current_state, renters_current_zip,
renters_phone, renters_email)
 VALUES ("' . 

Open in new window


I am trying to create a batch file which executes a query on HeidiSQL.

I created a text file containing the piece of SQL which updates a table in the database. The batch job (attached as test.txt) was then created and be scheduled to run on the first of every month.

If I run test.txt  I get an error which I have also attached as BATCHERROR.png.

I am fairly new to HeidiSQL and batch jobs so spent most of my time on google trying to find a solution.

Hello Experts,

Perhaps, I am going about this incorrectly. I am open to ideas on how to do this.

I have a PHP program that generates a PDF file, dynamically using FPDF. Once the user clicks the submit button, at run time, I need to be able to do the following nearly simultaneously:
Save the PDF file in a specified location;
Grab the freshly generated PDF;
Attach it to an email; and
Send the email to specified users.

First, is this even possible?

I was thinking about using PHP Mailer in combination with FPDF.

Any ideas?
I'm receiving this error when I run the program...

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables

The array has 50 items.
My array item is $_REQUEST['itemslist'].

//I'm setting up the query types with this.
$queryTypes = array_fill(0,count($_REQUEST['itemslist']),'s');

//Building the question marks here.
$questionMarks = array_fill(0,count($_REQUEST['itemslist']),'?');

//Merging the query types with the itemslist.
$params = array_merge($queryTypes, $_REQUEST['itemslist']);

//My query
if($grabStuff = $mysqli->prepare("SELECT var1, var2, var3, var4 FROM my_table where id in (" . $param . ")"))
call_user_func_array(array($grabStuff, 'bind_param'), refValues($params));      

//The function
function refValues($arr)
$refs = array();
foreach($arr as $key => $value)
      $refs[$key] = &$arr[$key];
return $refs;

When I print the shows all 50 items.
When I print the params (with an s) I get 100 items.
I'm using php 7.

I am trying to install wordpress on my Raspberry Pi. I can install apache2 and php without a problem
When I try and install MySQL I dont get asked to change the Password after the install
Also when I try to install php5-mysql I get an error saying dependency is missing

How do I fix this so I can continue the Wordpress install
Hi there,
I need to create a website for a charity and am looking for suggestions on existing frameworks to use.  The system should
support  users to register and login through a web portal.  

The basic operations is that the admin will add a list of activities in a main List.  A user can check-out these activities from the main list or the admin can assign an activity to a member.

1. User registration mechanism
2. Admin dashboard/user dashboard

I am looking for a PHP/Javascript - MySQL based system.  Can you suggest any frameworks that I can customize easily.
Thank you
I have inherited a program where the date field in a MySQL table is really a VARCHAR field.  The date looks like this string:  1260777185.  I can't change the format of the field because of various reasons.  How can I change/convert this field to a date format in my query?  It needs to be done at the query level.  The field is called timestamp.  

I'm using this query, but the field is blank once the query has been run.

SELECT amount, description, STR_TO_DATE('timestamp', '%m/%d/%Y') AS transdate FROM transactions

Thank you.
Hi, im having a hard time removing these, these files are huge


I've tried drop table '#mysql50##sql-df3_13ba706';

and mysql pretty much says I dont know what Im doing...

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''#mysql50##sql-df3_13ba706'' at line 1
my table looks like this

dt        ticker         open
1            A                1.2
1            B                 6
2            A                 1.4
2            B                 6.5

I would like it to turn out to be

dt           A            B
1            1.2         1.4
2            6            6.5

I tried using mysql query in below format

SET @sql = NULL;
'MAX(IF(ticker= ''',
''', open, NULL)) AS ',
) INTO @sql
FROM properties;
SET @sql = CONCAT('SELECT dt, ', @sql, ' FROM properties GROUP BY dt');

while executing the query in phpmyadmin I am getting below error .

Warning in .\libraries\dbi\DBIMysqli.php#436
mysqli_fetch_fields() expects parameter 1 to be mysqli_result, boolean given.

below are additional error messages :-

 the query is executing ,but looking into rows i am getting errors Backtrace .\libraries\dbi\DBIMysqli.php#436: mysqli_fetch_fields(boolean true) .\libraries\DatabaseInterface.php#2641: PMA\libraries\dbi\DBIMysqli->getFieldsMeta(boolean true) .\libraries\sql.lib.php#1848: PMA\libraries\DatabaseInterface->getFieldsMeta(boolean true) .\libraries\sql.lib.php#2199: PMA_getQueryResponseForResultsReturned( boolean true, array, string 'qc', string 'tbl_main', NULL, NULL,

I am stuck with this , can anyone guide me with the solution
The  following SQL query returns the field names of a certain table in my database.

    /* Build static SELECT Query string
             Get all column names from table tbl_mainsheet7...
             NOTE Back-Quotes around `COLUMN_NAME` & `TABLE_NAME`
             These allow for special characters in field names. */

Open in new window

The thing about it is that I need the field values for that field to be returned as well. As you can see I can only get the field_name and field_comment since I am currently querying a system table.


How can I run a SELECT query **DIRECTLY on tbl_mainsheet7** and return a single result displaying the **field_name** | **field_value** | **field_comment** ?
I have multiple tables in a database. Each table contains race results for a given year.

The tables contain 10 columns including surname VARCHAR), dob (VARCHAR) and pin3 (INT)

I need a query that will do the following:-

Find records (matched on surname and dob) that appear 3 times or more across all of the tables AND where pin3 does not equal "1"
I have a simple custom post type for events.

Added Meta Boxes with data:
start date and time
End date and type
Recurring option drop down: daily, weekly, monthly, yearly
Recurring end date

Meta gets stored in the wp_postmeta table.  Example image:
wp_postmeta for single event post
So, im looking to setup a query to get events within a range and also have the recurring events listed as rows.  so i can loop through on a page and other things.

How to enable Mysql server access through TCP/IP
where mysql installed in Centos machine.,.I am trying to access using mysql workbench it through TCP/IP but throwing error .. attached screenshot.
Where as when I select TCP/IP over SSH .. I can able to connect .
I am currently trying to develop a database for simultaneous remote user access (not a LAN network). From what i've researched, im going to do the LAMP stack (Ubuntu 16.04 server, Apache, MySQL and PHP). However, would this force the 10 end users to enter data through php and then I would have to connect the PHP forms to MySQL database? Can end users manage to see the tables this way or edit changes to database once they submit the forms?  Thanks for your help!
i want to get month (last 12 month) + current month and my date is in string.

SELECT pd.DC_Date,sum(pd.Quantity-pd.Credit_Quantity) AS 'Sales'
FROM past_year_data pd
JOIN idash_tb2_product_list PL ON PD.Product_Name=PL.Product_Name
WHERE pd.Branch_Name = 'Delhi' AND

I have use this query but didn't get any value
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

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.