Showing entries 8441 to 8450 of 44147
« 10 Newer Entries | 10 Older Entries »
[Solved] How to solve MySQL error code: 1062 duplicate entry?

Error Message:

Error Code: 1062. Duplicate entry ‘%s’ for key %d

Example:
Error Code: 1062. Duplicate entry ‘1’ for key ‘PRIMARY’


Possible Reason:
Case 1: Duplicate value.
The data you are trying to insert is already present in the column primary key. The primary key column is unique and it will not accept the duplicate entry.


Case 2: Unique data field.
You are trying to add a column to an existing table which contains data and set it as unique.


Case 3: Data type –upper limit.
The auto_increment field reached its maximum range.


[Read more]
Frictionless MySQL installation

I saw an interesting post about the ability of installing MySQL 5.7 without changing existing tools and procedures. The post is a plea to make MySQL installation frictionless.

That post was followed by a conversation on Twitter, where the recent security enhancements are blamed for getting in the way of existing practices and need a rewrite of installation tools.

I know the problem very well, as I have faced the installation change in MySQL Sandbox. SO I can sympathize with the ones who have to change deployment tools that rely on mysql_install_db, which was a Perl script up to version 5.6, then it was replaced with a C++ program in 5.7 and deprecated in the same version.

It occurred to me that, in order to keep the …

[Read more]
Using Powershell to implement Linux top command on Windows

Welcome to the final blog in Windows PerfCounters and Powershell series and sorry for the delay. The purpose of this blog is to explain the inner workings of top-script.ps1 script and practical usage of Performance counters on Windows through Powershell. It is intended for people who want Linux top - like tool on Windows.

The script is a part of and available in our existing benchmarking package (dbt2-0.37.50.10) developed by Mikael Ronstrom.

On Top:If you ever did benchmarking on Linux or simply wondered "where did all my resources go", top is your best friend. Since this post is not about Linux, you can google "Linux top explained" for more details.


On Performance counters:To learn about Windows PerfCounters, please refer to my previous …

[Read more]
How to create and check custom header with middleware for REST API in Laravel 5

In Laravel 5 REST API project sometime we need to create create our own custom header for security like Xhardik123456 this was example that means in your current project your every request with pass your own custom header like i give you examplethis custom header can improve your securit

Managing MySQL Replication for High Availability

Join us on February 2nd for this new webinar on Managing MySQL Replication for High Availability led by Krzysztof Książek, Senior Support Engineer at Severalnines. This is part of our ongoing ‘Become a MySQL DBA’ series.

Deploying a MySQL Replication topology is only the beginning of your journey. Maintaining it also involves topology changes, managing slave lag, promoting slaves, repairing replication issues, fixing broken nodes, managing schema changes and scheduling backups. Multi-datacenter replication also adds another dimension of complexity. It is always good to be prepared up front and know how to deal with these cases.

In this webinar we will cover deployment and management of MySQL replication topologies using ClusterControl, show how to schedule backups, promote …

[Read more]
What’s new in MariaDB Connector/C 3.0 – Part I: SSL

New SSL alternatives SSL connections in previous versions of MariaDB Connector/C are based on the OpenSSL library. But because of the OpenSSL heartbleed bug, licensing problems and the lack of support for different transport layers, we decided to add support for alternative SSL implementations. That’s why Connector/C 3.0 can use not only OpenSSL, but also […]

The post What’s new in MariaDB Connector/C 3.0 – Part I: SSL appeared first on MariaDB.org.

MySQL 5.7 default configuration: what’s new? (and what’s not)

Inspired by Peter Zaitsev’s post for MySQL 5.6, I decided to do a comparison between default configuration of MySQL 5.6 and 5.7. And I gotta tell you, some of the changes I found will have a huge impact on performance so make sure to get yourself familiar with them before you upgrade, even if you’re not otherwise running with a default configuration.

BEGIN

Interestingly, I hit the first roadblock before I could even start. It seems you can no longer extract the same information from the information_schema as in MySQL 5.6, and I had to use performance_schema instead:

mysql> insert into compare.vars57 (variable_name, variable_value) 
   ->  select VARIABLE_NAME, VARIABLE_VALUE from INFORMATION_SCHEMA.GLOBAL_VARIABLES;
ERROR 3167 (HY000): The …
[Read more]
MariaDB and Native JSON support ?

A question raised by my previous post is : What about MariaDB and native JSON support ? In my previous post I mentioned the possibility to use the MariaDB CONNECT storage Engine to store and access JSON content in normal text field. Of course having a native JSON datatype brings more value. It introduces JSON ...continue reading "MariaDB and Native JSON support ?"

GROUPCONCAT with different SEPARATOR in laravel Example

Whenever you need to use GROUPCONCAT with differente separatorI mean default separator is But you want to change etc as you want then you have to use use SEPARATOR keyword in GROUPCONCAT If you are working on laravel then you have to also use DBraw for write GROUPCONCA

Dealing with corrupted InnoDB data

Data corruption! It can happen. Maybe because of a bug or storage problem that you didn’t expect, or MySQL crashes when a page checksum’s result is different from what it expected. Either way, corrupted data can and does occur. What do you do then?

Let’s look at the following example and see what can be done when you face this situation.

We have some valuable data:

> select * from t limit 4;
+---+--------+
| i | c      |
+---+--------+
| 1 | Miguel |
| 2 | Angel  |
| 3 | Miguel |
| 4 | Angel  |
+---+--------+
> select count(*) from t;
+----------+
| count(*) |
+----------+
|  2097152 |
+----------+

One day the query you usually run fails and your application stops working. Even worse, it causes the crash already mentioned:

> select * from t where i=2097151;
ERROR 2006 (HY000): MySQL server has gone away

Usually this is the point when panic starts. The error log shows: …

[Read more]
Showing entries 8441 to 8450 of 44147
« 10 Newer Entries | 10 Older Entries »