Showing entries 1031 to 1040 of 22230
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: MySQL (reset)
How to Retrieve MySQL Last Insert ID in CodeIgniter 4

I use CodeIgniter 4 a great deal for learning, personal projects, and application development. In this post, I cover 2 different methods you can use and retrieve the MySQL Last Insert ID value after executing an INSERT statement in CodeIgniter. Continue reading for more information…

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

Model Setup

Starting out, I use the CLI Generator feature and create a Model by executing this code in the terminal in the project root:

php spark make:model user --suffix

I have removed much of the …

[Read more]
MySQL Shell and extra Python modules

When you use MySQL Shell with extra Python plugins (like these available on GitHub), sometimes, you could need extra Python modules.

Some of my plugins require requests and prettytable for example.

MySQL 8.0.26 uses embedded Python 3.9 and if your system doesn’t have that version (like Oracle Linux 8), you won’t be able to install the missing module.

So how could we install the missing modules ? The easiest method is to use PIP, but if you don’t have PIP for Python 3.9 installed on the system, this will be more complicated…. not really !

This how to install PIP in MySQL Shell:

wget https://bootstrap.pypa.io/get-pip.py
mysqlsh --py -f get-pip.py 

And now you can use PIP to install extra modules:

mysqlsh --pym pip …
[Read more]
Best way to start a thread when looking for MySQL Help and more

I’m active on multiple platforms (mail, slack, forums, …) and often, when people are looking for help, the first 5 or 10 questions are always the same:

  • which version of MySQL are you running ?
  • which OS ?
  • is it in the cloud ?
  • which provider ?
  • are you using replication ?
  • GTIDs ?
  • ….

I’ve added to MySQL Shell Plugin repository and plugin called support which provides an output that user can share when looking for MySQL help.

Usually, I’m focusing only in MySQL 8.0, but this plugin works with older versions too (don’t try MySQL 3.23…. it should be compatible from 5.6).

Let’s see an output if I run it locally:

[fred@fedora ~] $ mysqlsh root@localhost -e "support.fetchInfo()"
[Read more]
Comparing Graviton (ARM) Performance to Intel and AMD for MySQL

Recently, AWS presented its own CPU on ARM architecture for server solutions.

It was Graviton. As a result, they update some lines of their EC2 instances with new postfix “g” (e.g. m6g.small, r5g.nano, etc.). In their review and presentation, AWS showed impressive results that it is faster in some benchmarks up to 20 percent. On the other hand, some reviewers said that Graviton does not show any significant results and, in some cases, showed fewer performance results than Intel.

We decided to investigate it and do our research regarding Graviton performance, comparing it with other CPUs (Intel and AMD) directly for MySQL.

Disclaimer

  1. The test is designed to be CPU bound only, so we will use a read-only test and make sure there is no I/O activity during the test.
  2. Tests were run  on m5.* (Intel) , m5a.* (AMD),  m6g.*(Graviton) EC2 instances in the US-EAST-1 region. (List of EC2 see …
[Read more]
MySQL Table DDL file with phpMyAdmin

If you need a structure only .sql file of a MySQL tables’ Data Definition Language (DDL), phpMyAdmin makes this super-easy with just a few clicks. Continue reading and learn how…

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

Why use a DDL file?

Why would you need a structure-only .sql DDL file anyway?

Maybe you want to build out a tables’ structure on another server to bring in different data or something comparable, and want it void of any existing data.

Rather than creating the …

[Read more]
MySQL on Kubernetes demystified

Why

Marco, why did you write this long article?

Yes, it is long, and I know most of the people will not read it in full, but my hope is that at least someone will, and I count on them to make the wave of sanity. 

Why I wrote it is simple. We write articles to share something we discover, or to share new approaches or as in this case to try to demystify and put in the right perspective the “last shining thing” that will save the world.  

The “last shining thing” is the use of containers for relational databases management systems (RDBMS) and all the attached solutions like Kubernetes or similar. 

Why is this a problem? The use of containers for RDBMS is not really a problem per se, but it had become a problem because it was not correctly contextualized and even more important, the model that should be used to properly design the solutions, was not reviewed and modified in …

[Read more]
MySQL on Kubernetes demystified

Why

Marco, why did you write this long article?

Yes, it is long, and I know most of the people will not read it in full, but my hope is that at least someone will, and I count on them to make the wave of sanity. 

Why I wrote it is simple. We write articles to share something we discover, or to share new approaches or as in this case to try to demystify and put in the right perspective the “last shining thing” that will save the world.  

The “last shining thing” is the use of containers for relational databases management systems (RDBMS) and all the attached solutions like Kubernetes or similar. 

Why is this a problem? The use of containers for RDBMS is not really a problem per se, but it had become a problem because it was not correctly contextualized and even more important, the model that should be used to properly design the solutions, was not reviewed and modified in …

[Read more]
ProxySQL 2.3.0: Enhanced Support for MySQL Group Replication

ProxySQL 2.3.0 was recently released and when I was reading the release notes, I was really impressed with the Group Replication enhancements and features. I thought of experimenting with those things and was interested to write a blog about them. Here, I have focused on the following two topics:

  • When the replication lag threshold is reached, ProxySQL will move the server to SHUNNED state, instead of moving them to OFFLINE hostgroup. When shunning a server, it will be performed gracefully and not immediately drop all backend connections.
  • The servers can be taken to maintenance through ProxySQL using “OFFLINE_SOFT”.

Test Environment

To test this, I have configured a three-node GR cluster (gr1,gr2,gr3) in my local environment. I have configured a single primary cluster (1 writer, 2 readers).

mysql> select member_host,member_state,member_role,member_version from …
[Read more]
Compare Percona Distribution for MySQL Operator VS AWS Aurora and standard RDS

I decided to write this article after a discussion with other colleagues.  We were wondering how and if the Percona Distribution for MySQL Operator(PDMO) could help a starting business or a new project inside an enterprise.  We were also wondering how it behaves in relation to already well established solutions, like Amazon RDS or Google SQL. 

In fact, we often see analysis and benchmarking covering huge datasets and instances with very high levels of resources . But we tend to forget that any application or solution started as something small, and it is important to identify a database platform that allows us to scale from zero to a decent amount of load, while keeping the cost as low as possible.  

This also happened while I was trying to get a bit more performance and stability out of Percona Operator for MySQL, and identify the possible minimal entrypoint and its usage. 

Given all the above …

[Read more]
Compare Percona Distribution for MySQL Operator VS AWS Aurora and standard RDS

I decided to write this article after a discussion with other colleagues.  We were wondering how and if the Percona Distribution for MySQL Operator(PDMO) could help a starting business or a new project inside an enterprise.  We were also wondering how it behaves in relation to already well established solutions, like Amazon RDS or Google SQL. 

In fact, we often see analysis and benchmarking covering huge datasets and instances with very high levels of resources . But we tend to forget that any application or solution started as something small, and it is important to identify a database platform that allows us to scale from zero to a decent amount of load, while keeping the cost as low as possible.  

This also happened while I was trying to get a bit more performance and stability out of Percona Operator for MySQL, and identify the possible minimal entrypoint and its usage. 

Given all the above …

[Read more]
Showing entries 1031 to 1040 of 22230
« 10 Newer Entries | 10 Older Entries »