Showing entries 1 to 10 of 1331
10 Older Entries »
Displaying posts with tag: Linux (reset)
MySQL install ‘n’ config one-liners

Back again, now with MySQL installs. And this means using the MySQL repository this time around.

I’ve been installing and configuring InnoDB Clusters and ClusterSets and thinking about the Ansible and Terraform users amongst us, maybe one-liners might help someone out there.

So, what about if I share how to install the MySQL repo, install the MySQL instance, create an InnoDB Cluster, add a MySQL Router, create a ClusterSet, make sure the Router is ClusterSet-aware, and then test it out. And all via one-liners.

First up, obrigado Miguel for https://github.com/miguelaraujo/ClusterSet-Demo.

To simplify the command execution sequence, these sections aim to help summarize the technical commands required to create the whole platform. And on a default path & port configuration, to ease operational deployments for all those 000’s of …

[Read more]
Ruby+MySQL on Ubuntu

This post goes through installing and configuring Ruby and Ruby on Rails for MySQL. The first step requires updating the Ubuntu OS:

sudo apt-get update

Interestingly, I found that the man-db service had inadvertently stopped. It raised the following error:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

You run this command to find the problem with the dpkg utility:

sudo dpkg --configure -a

It returned:

Setting up man-db (2.10.2-1) ...
Updating database of manual pages ...
man-db.service is a disabled or a static unit not running, not starting it.

The following command started the man-db service:

sudo systemctl start man-db.service

Next, you install the prerequisite packages with this command:

sudo apt-get install -y git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev …
[Read more]
Ubuntu, Perl & MySQL

Configuring Perl to work with MySQL is straight forward. While Perl is installed generally, you may need to install the libdbd-mysql-perl library.

You install it as a sudoer user with this syntax:

sudo apt install -y libdbd-mysql-perl

Display detailed console log

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libmysqlclient21
The following NEW packages will be installed:
  libdbd-mysql-perl libmysqlclient21
0 upgraded, 2 newly installed, 0 to remove and 12 not upgraded.
Need to get 1,389 kB of archives.
After this operation, 7,143 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libmysqlclient21 amd64 8.0.35-0ubuntu0.22.04.1 [1,301 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libdbd-mysql-perl amd64 …
[Read more]
Apache2 on Ubuntu

It’s always interesting when I build new instances. Ubuntu 22.0.4 was no different but I ran into an issue with installing Apache2 and eventually loading the mysqli module.

The Apache2 error was an issue with an unsupported module or hidden prerequisite. The MySQLi required an Apache reload after installation. Contrary to some erroneous posts the mysqli driver is supported on PHP 8.1.

Apache2 installation starts first and the mysqli module reload and verification script follows. On Ubuntu, you install Apache2 if you’re unaware of the hidden pre-requisite, otherwise install the pre-requisite first and avoid the error.

This is the command to install the apache2 module:

sudo apt-get install -y apache2

It generated the following error message:

apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/wsgi.load: Cannot load …
[Read more]
Build MySQL 8 from the source rpm in OL8

After having explained how to build MySQL 8 (MySQL 8.0 and MySQL 8.1) on OL9 and OL7, this episode of the series will cover how to build MySQL 8 on Oracle Linux 8 (OL8) and compatible (EL8, CentOS 8, …).

My build machine is a VM.Standard.E4.Flex instance on OCI having 8 OCPUs and 128GB of ram with Oracle Linux 8.8. The machine has also a block volume of 50GB attached and mounted in /home/opc/rpmbuild:

Getting the source RPM

To get the source RPM, you need first to install the MySQL Community’s repo:

$ sudo dnf install -y https://dev.mysql.com/get/mysql80-community-release-el8-7.noarch.rpm

But comparing to OL7 and OL9, this is maybe the most complicate process if you are not aware …

[Read more]
Build MySQL 8 from the source rpm in OL7

Following our discussion with Simon about compiling MySQL 8.0.34 and 8.1.0 for OL9 (RedHat and CentOS Stream as well), see this blog post, we realized that compiling the latest MySQL 8.x on OL7 (EL7) wasn’t very simple either.

After soliciting the MySQL release engineer team, I was able to compile MySQL correctly from its src rpm.

Let me share the various steps with you.

My build machine is a VM.Standard.E4.Flex instance on OCI having 4 OCPUs and 64GB of ram with Oracle Linux 7.9. The machine has also a block volume of 50GB attached and mounted in /home/opc/rpmbuild.

Getting the source RPM

To get the source RPM, you need first to install the MySQL Community’s repo:

$ sudo yum install -y …
[Read more]
Build MySQL 8 from the source rpm in OL9

After discussing with Simon about some issues when trying to recompile MySQL 8.0.34 on CentOS 9 (see #111159), I also tried it and indeed some dependencies are not listed when compiling via the source RPM.

Let’s see how to recompile the two latest versions of MySQL (8.0.34 and 8.1.0) using the source RPMs.

I use Oracle Linux 9 as build machine.

Getting the source RPM

To get the source RPM, you need first to install the MySQL Community’s repo:

$ sudo dnf install …
[Read more]
MySQL on Ubuntu

Working with my students to create an Ubuntu virtual environment for Python development with the MySQL database. After completing the general provisioning covered in this older post, I’d recommend you create a python symbolic link before installing the MySQL-Python driver.

sudo ln -s /usr/bin/python3 /usr/bin/python

You install the Python development driver with the following:

sudo apt-get -y install python3-mysql.connector

Create a python_connect.py file to test your Python deployment’s ability to connect to the MySQL database:

#!/usr/bin/python

# Import the library.
import mysql.connector
from mysql.connector import errorcode
 
try:
  # Open connection.
  cnx = mysql.connector.connect(user='student', password='student',
                                host='localhost', …
[Read more]
MySQL Posts Summary

Here’s a quick catalog for my students of PowerShell, JavaScript, and Python examples connecting to MySQL:

[Read more]
How to Install LOMP Stack (OpenLiteSpeed, MySQL, and PHP) on Rocky Linux 9

OpenLiteSpeed is a lightweight and open-source version of the LiteSpeed Server developed by LiteSpeed Technologies. It supports Apache Rewrite rules, HTTP/2 and HTTP/3, TLS v1.3, and QUIC protocol.

Showing entries 1 to 10 of 1331
10 Older Entries »