MySQL Server

46K

Solutions

60

Articles & Videos

22K

Contributors

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

If I have names in a database that are found when users go to a page to search for names in my database - how can I get Google to also search the database for the same names - so they can show up in a Google search?

Pages re in PHP and data is in MySQL.

Or is it not possible?
0
NEW Veeam Agent for Microsoft Windows
LVL 1
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

DELIMITER $

CREATE PROCEDURE EXCEPTIONHANDLER (IN P_STUDENT_ID INT)

BEGIN
    DECLARE NOTEXISTS INT;

    BEGIN
    SELECT STUDENT_ID INTO NOTEXISTS
    FROM STUDENT
    WHERE P_STUDENT_ID = STUDENT_ID;
    IF NOTEXISTS != 15
    THEN SIGNAL SQLSTATE '45000'
    SET MESSAGE_TEXT = 'NO STUDENT_ID FOUND';
    END IF;
    END;

END$

DELIMITER ;


Hi. I want to create a stored procedure that shows a message when I put an ID which does not exist in student table. With the code above, when I call the procedure with the ID 15, as I put in the code, I do not get the message because I have ID 15. But when I call the code for the IDs that already exist in the student table, I still get the message. It shows that the code only works for the ID that I entered in the code (like 15). So, how can I make it work for all IDs?
0
I plan on purchasing a custom app that will utilize MySQL.  Does anyone know of some good training resources for training?  I'm open to in-person or web based.
0
I have seen some of the examples we have for pivot and unpivot in mysql,where the rows and columns are changes accordingly, but i have a table like below

 table1

Month    Current            30 Days       30 - 60 Days
Apr-13   1375159316       34511076         6423821
May-13   71398540         5674629          4775687
Jun-13   1314130060       27364660         9328588

and want it to create a new table like below

table2

Month            Apr-13               May-13              Jun-13
Current         1375159316      71398540     1314130060
30 Days         34511076        5674629          27364660
30 - 60 Days     6423821       4775687         9328588

How can i achieve the above.
0
Hi

I have a datatable and want that datatable to upload in a table in mysql. I have used bulkupload in sql, need to know how we can do the same using MySqlBulkLoader.

I dont want to give each and every column name of the table while upload and neither want to convert the datatable to cvs format.

Is there a way i can directly bulk upload using mysql from datatable directly?
0
I want to create a stored procedure. When I search on student_id and if it does not exist, I need to set an “out_msg” parameter as “No Student ID Found”.
Secondly, I want to create an insert statement to insert student information ( INSERT INTO STUDENT (STUDENT_ID, NAME, GENDER) values (5,'x','M'); )   into student table. If the student_id already exists, I need to handle exception “1062” Duplicate entry found and set “out_msg” OUT parameter with a meaningful message.
Input and Output parameters are
 IN        STUDENT_ID INT
,OUT    OUT_MSG VARCHAR(100)
Any help, please?
0
My sample site URL : My working Site URL

I am trying to find a solution that will allow me to plot the GPS coordinates of many moving objects "live" on a Google Map.

The GPS coordinates of each object will constantly be updating into a MySQL database, and I'd like to know whether it is possible to read each updated coordinate, maybe once every couple of seconds, and re-plot the marker coordinates on the Google Map, without the user having to refresh the page.  Can this be done,?

would it also be possible to make each marker different, and each marker clickable to get more information on the particular object?

My map based on Jack Dougherty's FusionTable-Map-2-layers Template and running nicely on my hostgater server.

I have Traccar Open Source GPS Tracking Platform hosted with Amazone AWS and able to get tracker data to the mysql database, this database update every 30 second with live tracker data

# my db name “newTraccar” & all tracker data update for table `positions`

// -------------- Table structure for table `positions` ---------------------//

CREATE TABLE IF NOT EXISTS `positions` (
  `id` bigint(20) NOT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `altitude` double DEFAULT NULL,
  `course` double DEFAULT NULL,
  `latitude` double DEFAULT NULL,
  `longitude` double DEFAULT NULL,
  `other` 

Open in new window

0
while using php code for each month and date .....why cant we use "if condition" or any other looping condition
0
Hi Experts

Could you point a way to generate an Excel chart and PDF File by using  Fusioncharts ?

After the grid is formed, accordingly to:
img001
I need to generate an Excel chart with its content.

Thanks in advance.
0
After upgrading MySQL to version - 5.7.18, we are continuously getting following kind of Note in error log file of MySQL in both platform - Linux and as well as in windows server editions:-
    2017-06-13T03:02:23.631926Z 4 [Note] Access denied for user 'root'@'localhost' (using password: NO)
and In some cases it is as follow:-
    2017-06-10T08:24:43.953832-06:00 357 [Note] Access denied for user ''@'localhost' (using password: NO)


We have checked there is no PHP script which is trying to connect with user 'root' .

Please help in solving this.
0
Free Tool: SSL Checker
LVL 8
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Dear Experts
I am we are using SugarCRM for sales force automation though the server hardware is with good config still the performance is low, slow loading while login and as well listing the leads and fetching reports takes more time, we have around 150 users and we are using sugar enterprise. not really sure should I have to host database server i,e mysql in a separate instance , this application is running on redhat enterprise linux with httpd2.4, mysql5.6 and php56,
PHP modules and settings were able to install all but could not mange mcrypt as it was not supported by redhat, also could not install libsodium extension however without these two i,e mcrypt and libsodium still instance is found to be working not sure if the performance issue that is load time is consuimg more is due to this , the perfromance is slow within the same network in my lan where sugarcrm is hosted . please suggest how to resolve this. thanks


Sugar-7.docx
0
I have tried replace(myfield)=(myfield,''',' ') which obviouslyy does not work

Is there a mysql query that will replace all the ' with a space

All from the myphpadmin interface?
0
I am trying to get fields that have partial matching addresses to match via different suffixes for addresses.. for example:

10 hideman Street would qualify as a match of 10 hidman St.

These are the suffixes I am working with so far:

s/street/st
road/rd
drive/dr
boulevard/blvd
avenue/ave

This is my query, but I need to know how to edit it to match the address fields with the above conditions:

SELECT
`group`.`Group ID`,
`group`.`Additional Address Line 1`,
smart.subs_acct_num,
smart.Address,
smart.mac_address
FROM
`group` ,
smart
WHERE
`group`.`Additional Address Line 1` = smart.Address
0
<?php require_once('../Connections/TickTockDB.php'); ?>

<?php
error_reporting(E_ALL);
require("phpmailertest/PHPMailer_5.2.4/class.phpmailer.php");
// $email and $message are the data that is being
// posted to this page from our html contact form

$attachmentfile = $_GET['invPath'];
echo $attachmentfile;

$message = $_REQUEST['con_msg'] ;
$contactname = $_REQUEST['con_name'] ;
$contactsubject = $_REQUEST['con_sub'] ;
$break = "<br />";
$space = "&nbsp;";
$labelname = "Name:";
$labelsub = "Subject:";
$labelmsg = "Message:";
$bold = "<b>";
$boldend = "</b>";

// When we unzipped PHPMailer, it unzipped to
// public_html/PHPMailer_5.2.0
require("lib/PHPMailer/PHPMailerAutoload.php");

$mail = new PHPMailer();

// set mailer to use SMTP
$mail->IsSMTP();
$mail->SMTPDebug = 2;

// As this email.php script lives on the same server as our email server
// we are setting the HOST to localhost
$mail->Host = "mail.authsmtp.com";  // specify main and backup server
//$mail->SMTPSecure = "ssl";
$mail->Port = 2525;
$mail->SMTPAuth = true;     // turn on SMTP authentication

// When sending email using PHPMailer, you need to send from a valid email address
// In this case, we setup a test email account with the following credentials:
// email: send_from_PHPMailer@bradm.inmotiontesting.com
// pass: password
$mail->Username = "xxxxxxx";  // SMTP username
$mail->Password = "yyyyyyy"; // SMTP password

// $email is the user's email address that is specified
// on our contact us page. We 

Open in new window

0
hi , i'm working on a web application (a platform for conferences in a company )
i want to integrate a video chat system inside this website . that's mean that any one registered on the site can have an online chat with somebody else (registered also )
any suggessions please
0
I would like to run a query using SSH and export those results to a csv file.

I can connect to the DB using SSH and run the query, but how do I get it to output the results to a file vs screen output?

Basically

Connect to MySql vis SSH
Query select first,phone from tablename where active='y'
output to leads.csv

Thanks in advance
0
Hi All,

I am trying to setup a WordPress site for a company that does not have internet access.  It takes quite a while to load as each of the external HTTP requests have to time out.

Is there a way to disable / block the HTTP requests?

I tried adding this to my wp-config.php, but it doesn't appear to have done anything.

define('WP_HTTP_BLOCK_EXTERNAL', true);

Open in new window



Any suggestions?
0
Good Afternoon,
I have a MYSQL table where I need a query to identify any duplicate rows the entire row so all column's need to be the same.  The best I have come up with is the below but its not functioning correctly.

SELECT Customer, Department_user, Plex, Colour, Pages, Envelope, Date, Postal, EnvelopeType, SystemVersion, DateTime, COUNT(EnvelopeType) AS Occurance_Count
FROM        Epod
GROUP BY Customer, Department_user, Plex, Colour, Pages, Envelope, Date, Postal, EnvelopeType, SystemVersion, DateTime
HAVING     (COUNT(EnvelopeType) > 1)

Thanks

John H
0
Hi,
When I try to restore a db backup (40Mb zipped), It takes around 5 mins to upload and  then around 2 mins later I got this error

Internal Server Error 500 The cPanel Server operation timed out at cpsrvd.pl line 541.

I changed

max_execution_time=9000
cPanel PHP max execution time=9000

but it did not help. Any ideas?
Thank you.
0
Get 15 Days FREE Full-Featured Trial
LVL 1
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Customer currently stores credentials in a MySQL database.  They believe the information should be stored elsewhere.

Anyone have any ideas?

Objection I have to this is that if this is done two sets of data needs to be maintained.
0
I'm trying to figure out how to lower the number of temp tables being written to disk.
The server is Centos7 with 16GB running mariadb as follows. The server is dedicated to running the db and nothing else.

I was able to get the temp tables down to some 17% at one point but cannot get back to that and don't recall how I was getting there. I've been making rather slow changes and somewhere, lost track.

# ./tuning-primer.sh

        -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.5.52-MariaDB x86_64

Uptime = 5 days 5 hrs 24 min 18 sec
Avg. qps = 58
Total Questions = 26347283
Threads Connected = 12

Server has been running for over 48hrs.
It should be safe to follow these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 2.000000 sec.
You have 0 out of 26347304 that take longer than 2.000000 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.5/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 512
Current threads_cached = 

Open in new window

0
Form Design
I cannot Printing using Print Document. Please help my problem.
I'm using 3 Tables :
Registration - (Shop_Name, Address, Contact, CST_No, Licence2)
r_sales-(Bill_No, Bill_Date, Cus_Name, Cus_Address, Mode_Pay, Net_Amt, Discount, G_Total, Paid_Amt, Balance)
r_sales1-(Bill_No, M_Name, M_Cat, Batch_No, Mfg_Dt, Exp_Dt, Qty, Rate, Amt)

Private Sub cmdPrint_Click(sender As Object, e As EventArgs) Handles cmdPrint.Click 'Save Print Section
        If lblBill.Text = "" Or txtPaid.Text = "" Or cboName.Text = "" Or lblTotal.Text = "0.00" Or lblDiscount.Text = "0.00" Or cboPayment.Text = "Select" Or lblGt.Text = "0.00" Then
            MsgBox("Please Add the Sales", MsgBoxStyle.Exclamation)
            Exit Sub
        End If

        '################## IF Yes - PRINT and SAVE ##############
        Dim S1 As String = ".00"
        If MessageBox.Show("Do you want to Print?", "Retail Sales", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
            Cons()
            Str = "insert into r_sales(bill_no,bill_date,cus_Name,Cus_Address,mode_pay,Net_Amt, Discount,G_Total,Paid_Amt,Balance)values('" & lblBill.Text & "','" & DTP.Value.ToString("yyyy-MM-dd") & "','" & cboName.Text & "','" & txtAddress.Text & "', '" & cboPayment.Text & "','" & lblTotal.Text & "','" & lblDiscount.Text & S1 & "','" & lblGt.Text & "','" & txtPaid.Text & S1 & "','" & lblBalance1.Text & S1 & "')"
            Cmd = New MySqlCommand(Str, Con)
            

Open in new window

0
Hi,

I am about to start building a module to manage client services. Based on what the client purchased, those steps can vary. For example,

Product A
- get code from client
- send code to vendor
- get serial number from vendor
- send serial number to client

Product B
- get a list of names from client
- send names to engraver
- get product back from engraver
- send product to client

There could be as many as 15-20 steps in the process depending upon the product purchased.

What I am trying to figure out is the best way to manage the process using mysql and PHP. So, far what I am thinking is creating a table (customer_service_process) with all the many possible steps for all products. Then for each product I could have a field for the steps necessary for that specific product. Then I could pull the 'customer_service_process' record for the client and see which steps were necessary for their product and step through the process. This would work, but seems a little inefficient site I could have many unnecessary fields for each client. Also not a great idea if a new product is added and a new step in the process is required.

Any experts with experience building something like this? Any suggestions on how best to manage this?

Thanks in advance for your time in giving me some input on this project.
0
creating View  in MYSQL SERVER getting to much  slow down for  more then  twenty thousand records.
The view have been created in mysql. But when i click on the browse then it getting  slow down . main issue is that how can i handle large records in mysql views. Aactually i am converting Ms Access Database into mysql . there is lot of queries in Aaccess DB that i have to need use as view in mysql . but for large getting queries when i use in mysql for view then it gett very slow .


here is the example of query that is used for creating view in mysql server.it is fetching twenty thousand records.

SELECT FormulaInfo.FormulaInfoID, (Sum(formuladetail.Qty*fragrance.cost*unittable.unitconverter/`unittable_1`.unitconverter)/totalqty) AS UnitCost,
 Format(Sum(formuladetail.Qty*fragrance.previouscost*unittable.unitconverter/`unittable_1`.unitconverter)/totalqty
, 'Currency') & ' / ' & `unittable_1`.unitcode AS UnitPCost
FROM (UnitTable INNER JOIN Fragrance ON UnitTable.UnitID = Fragrance.Unit) INNER JOIN
(((FormulaInfo INNER JOIN FormulaDetail ON (FormulaInfo.FormulaID = FormulaDetail.FormulaID) AND (FormulaInfo.Revision = FormulaDetail.Revision)) INNER JOIN UnitTable AS UnitTable_1 ON FormulaInfo.Unit = UnitTable_1.UnitID) INNER JOIN Qry_FormulaList_TotalQty ON FormulaInfo.FormulaInfoID = Qry_FormulaList_TotalQty.FormulaInfoID) ON Fragrance.FragranceID = FormulaDetail.FragranceID
GROUP BY FormulaInfo.FormulaInfoID, Qry_FormulaList_TotalQty.TotalQty, …
0
Lately I'm working on some SQL scripts maint for mysql 5.7 and received an error well running the script.

Error 1136 (21S01) at line 473: Column count doesn't match value count at row 1

And need some help to get this corrected and was wondering if someone could advise me on SQL Code Validation/ checker
the available tools online seems to crash if you provide more lines then they can Handel.

Any help will be appreciated.
0

MySQL Server

46K

Solutions

60

Articles & Videos

22K

Contributors

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.