I will create or setup and optimize your Facebook Business Page with impressive design for $5

I will create or setup and optimize your Facebook Business Page with impressive design

Hello ,Welcome to my Gig

Facebook Business page is a important things to promote business and product. By creating a business page you can attract your potential customers. It also helps you to obtain a good position in social media.

I can create and seo optimize Facebook business page or Facebook fan page professionally. I have been working in this sector for a long period of time.

Services I Provide:

  • Create and Set up
  • Optimization
  • Add CTA Buttons
  • Add Contact & Location
  • Install custom tabs and setting
  • Link to Website
  • Targeted Hashtags

Why Choose Me:

  • 24/7 Customer support
  • On-time delivery
  • High-quality service
  • 100% satisfaction guarantee
  • Impressive cover image

Note:Feel free to contact before placing an order if you have any question.

Thanks

Regards

Dmsujoy

.

transactions – Why does all cold/offline storage setup require three steps?

I was reading about cold/offline storage and from what I have seen all clients seem to work the same. Requiring you to create the transaction on the online computer, getting it to the offline computer and signing it, then getting it back to the online computer to broadcast, but I don’t get why? It seems to me you should be able to make this in two steps and it would also make it more secure as data only ever have to flow in one direction. You create and sign the transaction on the offline computer then you get it to the online computer to broadcast. So why is it not implemented like this in clients?

MyDreams.cz Best Dedicated Hosting, Extra quick set-up, high speed connection | Proxies-free

MyDreams innovations s.r.o. is a company that has been operating in the field of hosting services since 2004. First as a self-employed person and now as a company. MyDreams team members are people with many years of experience.

Check out MyDreams.cz Dedicated Servers:

1U Server Rookie+
Unmanaged Supermicro
1x Intel Xeon E3 2.00GHz (1 core) or equivalent
RAM: 6 GB
Disks: 2x 200 GB SATA III, Raid 1
1x IPv4 address
2x 100 Mbit eth
100 Mbps guaranteed bandwidth
Ready within 48 hours
Price – 580 Kč – Monthly / annual payments – ORDER NOW

1U Server Economic+
Unmanaged Supermicro
1x Intel Xeon E3 2.00GHz (2 cores)
RAM: 8 GB
Disks: 2x 250 GB SATA III, Raid 1
3x IPv4 address
2x 100 Mbit eth
100 Mbps guaranteed bandwidth
Ready within 48 hours
Monthly / annual payments
Price – 980 Kč – Monthly / annual payments – ORDER NOW

1U Server Business
Unmanaged Dell
1x E-2234 (4 core)
RAM: 32 GB DDR3
Disks: 2x 240 GB SSD Raid 1
3x IPv4 address
2x 1 Gbit eth
1 Gbps guaranteed bandwidth
Ready within 48 hours
Price – 4450 Kč – Payment for 6 months – ORDER NOW

The dedicated server price includes:

  • Server rental and housing
  • 1000 Mbps Connectivity (NIX) without aggregation
  • 100 Mbps Connectivity (Tranzit) without aggregation
  • Replacing the Damaged Hardware
  • Monitoring of services
  • Primary installation of the system
  • Unlimited traffic
  • 24/7 restart on request
  • Housing in the modern Prague data center
  • Professional Helpdesk interface
  • Monthly, quarterly, or annual payments
  • Possibility to pay by Paypal
  • Without notice

5% DISCOUNT on annual billing.
Servers runs on solutions from SuperMicro, HP, IBM, DELL a SUN. We prefer servers SuperMicro a DELL.
Above-standard dedicated server management, SLA, backup to external server, and Cloud solutions can be ordered in SERVER MANAGEMENT.

If you have any questions, you are free to CONTACT US!

NOTE:
This doesn’t mean that you can engage in illegal activities, which we strictly forbid. This includes, but is not limited to, direct spam, phishing, fraud, some kind of pornography or anything which violate the Czech Republic or European Union laws.

How would I set up Debian 10 and Postfix security for a limited send-only email setup?

I (me and my wife) run a small Debian 10/Buster web server with a few websites for friends and need to set up outgoing email. I’ve got to the point where I can send emails from the command line (echo "Message Body" | mail -s "Message Subject" TARGET_EMAIL_HERE).

We need a set up that meets the following requirements:

  • only a few emails each week are will be sent:
    • some emails from a Perl contact form on a website (which needs tighter anti-spam protection, was going to use the Google CAPTCHA)
    • some emails with document attachments from a theatre booking system that only known and trusted users can log into
  • need a ‘reply to’ field in outgoing emails so people can hit “reply” in their email client (appears easy when setting up scripts to use mail servers)
  • we don’t want to allow any incoming email to the server

What we have:

  • user websites are set up in their user directories (which are 755), but we administer the sites and they cannot log in to the server
  • me and my wife are sudo-ers (two system admins) and the only people who login via SSH/SFTP
  • root login is disabled
  • We’ve changed the SSH port

I’m aware this is the bare minimum of info, but I’d like some guidance on setting up and securing Postfix for this kind of usage.

MySQL SSL Setup – Database Administrators Stack Exchange

I am using the MySQL 5.7 SSL Setup Guide (combined with a few other guides on the website + google searches).

I have a replica and source working, I am now trying to configure SSL.

My understanding is that MySQL generates the certs we need on startup so I am attempting to use those. I also tried to use the certbot certs I have setup for my domains but those failed (is it possible to use certbot/letsencrypt certs here?). I am just trying to get any SSL connection at this point.

I have my config files setup like so (I’ve tried a number of configs now)

# This is in the source
(mysqld)
ssl_ca=/var/lib/mysql/ca.pem
ssl_cert=/var/lib/mysql/server-cert.pem
ssl_key=/var/lib/mysql/server-key.pem
require_secure_transport=ON

# This is in the replica
(client)
ssl-ca=/var/lib/mysql/ca.pem
ssl-cert=/var/lib/mysql/client-cert.pem
ssl-key=/var/lib/mysql/client-key.pem

On the replica if I do mysql -u root -p I get this error: ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed

Looking through the logs on my replica I see that the connection to the source is failing with error code 3159.

Running mysql > status; on source I see that SSL is not in use.

Dedicated Server Deals @40% OFF@£29/M or £4.9/day – Instant Setup FREE 5 I SATA/ SSD Drives – 1GBits – US | Proxies-free

SPECIAL YEAR DEDICATED SERVER DEALS 2021!!! HUGE DISCOUNTS ON ALL DEDICATED SERVERS VALID FOR A LIMITED TIME WHILE THE STOCK LASTS!!!

BLAZING FAST HOST announces the SPECIAL DEDICATED SERVER DEALS 2021 on our Self Managed Dedicated Servers.

About us!
BLAZING FAST HOST, one of the few companies to provide individual care with the essence of a small-medium companies with the best practices & higher customer satisfaction levels. Our mission is to provide a versatile & dependable one-end hosting solutions for the small-medium business entrepreneur, and eliminate the need for you to deal with a host of different online vendors.
BLAZING FAST HOST is a fully managed technology service provider, providing you with Web Hosting, Reseller Hosting, Public Cloud Server, Self Managed VPS , Managed SSD VPS with cPanel, High Performance Dedicated Servers and Fully Managed Dedicated Servers.

Why to Choose Us?
Blazing Fast Host provides reliable, quality support and blazing fast hosting services at very reasonable price to the people around the world. We maintain a stable hosting environment, serving clients with dedicated team for technical support and sales/billing support.

Are you looking for high performance business-ready server? Need big RAM for your hungry applications or customers? Require a network with actual real world performance? Need high storage server for offsite backup services? Your search would be stop here with the below given high performance dedicated servers at very affordable price and quality support.

HURRY UP! Right Now Grab this offer for your Personal or Business use, Before the EXCLUSIVE SALES OFFER Expires!
Our Special Promotions are only for the very limited time and stocks. So, place your order right now and grab the high quality hosting at the very reasonable price.

Our Features:
• 24×7 Security and Multi-level Access Control
• Power Protection by UPS (N+4) and 2MW Backup Generator
• Bandwidth provided by major Tier 1 carriers
• Connectivity provided by 7 diverse fiber operators
• Strict Climate Control with Liebert CRAH Units & Chilled Water Cooling
• Fire Detection & Suppression Systems

Use Below Given Coupon Codes to Receive Up To 40% Recurring Discounts on All Dedicated Server Plans!

RECURRING 40% OFF FOR LIFE on ANNUAL BILLING BILLING TERM with Coupon Code “BFHOST40

RECURRING 25% OFF FOR LIFE on ANY BILLING BILLING TERM with Coupon Code “BFHOST25

♥ ♥ ♥ ♥ ♥ SPECIAL DEDICATED SERVER DEALS 2021 VALID FOR LIMITED TIME WHILE THE STOCK LASTS WITH THE ABOVE GIVEN COUPON CODES. ♥ ♥ ♥ ♥ ♥

▐▌▐▌AMD QuadCore SSD

* CPU: 3Ghz – 4 Cores / 4 Threads
* Port Speed: 1 Gbit
* Bandwidth: 100 TB Premium Transfer
* Memory: 16 GB DDR3 RAM
* Primary Hard Drive: 120GB SSD + 2TB SATA
* Operating System: Linux
* Free IPs: 5 Usable IPs (/29) | /64 IPv6 Address Block**
* Server: Self-Managed, Pre-Configured
* 100% Up-Time: Network, Power, Cooling
* DC Location : Kansas City, US
Monthly Price: £49/m Now Only £29/m | Setup Fee: Waived, Limited Quantity While Stock Lasts

DEPLOY NOW – AMD QuadCore

▐▌▐▌ Intel Dual Xeon 5150

* CPU: 2.66 Ghz x 2 Processors – 4 Cores / 4 Threads
* Port Speed: 1 Gbit
* Bandwidth: 100 TB Premium Transfer
* Memory: 16 GB DDR2 RAM
* Primary Hard Drive: 2 x 500GB SATA
* Operating System: Linux
* Free IPs: 5 Usable IPs (/29) | /64 IPv6 Address Block
* Server: Self-Managed, Pre-Configured
* 100% Up-Time: Network, Power, Cooling
* DC Location : Kansas City, US
Monthly Price: £59/m Now Only £36/m | Setup Fee: Waived, Limited Quantity While Stock Lasts

DEPLOY NOW – Intel Dual Xeon 5150

▐▌▐▌AMD HexaCore SSD

* CPU: 2.7Ghz – 6 Cores / 6 Threads
* Port Speed: 1 Gbit
* Bandwidth: 100 TB Premium Transfer
* Memory: 16 GB DDR3 RAM
* Primary Hard Drive: 120GB SSD + 2TB SATA
* Operating System: Linux
* Free IPs: 5 Usable IPs (/29) | /64 IPv6 Address Block**
* Server: Self-Managed, Pre-Configured
* 100% Up-Time: Network, Power, Cooling
* DC Location : Kansas City, US
Monthly Price: £69/m Now Only £42/m | Setup Fee: Waived, Limited Quantity While Stock Lasts

DEPLOY NOW – AMD HexaCore

▐▌▐▌ Intel Dual Xeon 5420

* CPU: 2.5 Ghz -2 Processors: 8 Cores/8 Threads
* Port Speed: 1 Gbit
* Bandwidth: 100 TB Premium Transfer
* Memory: 16 GB DDR2 RAM
* Hard Drive: 240GB SSD OR 2 x 1TB SATA
* Operating System: Linux
* Free IPv4: 5 Usable IPs (/29) | /64 IPv6 Address Block
* Server Type: Self-Managed Instant setup
* 100% Up-Time: Network, Power, Cooling
* DC Location: MO, US
Monthly Price: £79/m Now Only £48/m | Setup Fee: Waived, Limited Quantity While Stock Lasts

DEPLOY NOW – Intel Dual Xeon 5420

▐▌▐▌ Intel Core I7-3700

* CPU: 3.1GHz/3.9GHz Turbo ; 4 Cores/8 Threads
* Port Speed: 1 Gbps Dedicated Port
* Bandwidth: 100 TB Premium Transfer
* Memory: 16 GB DDR3 RAM
* Primary Hard Drive: 2TB SATA
* Operating System: Linux/Windows*
* Free IPv4: 5 Usable IPs (/29) | IPv6: /64
* Server Type: Self-Managed Instant setup
* 100% Up-Time: Network, Power, Cooling
* DC Location : MO, US
Monthly Price: £99/m Now Only £59/m | Setup Fee: Waived, Limited Quantity While Stock Lasts

DEPLOY NOW – Intel Core I7-3700

▐▌▐▌ Dual Intel Xeon 5520

* CPU: 2.26 Ghz x 2 : 8 Cores + 16 Threads
* Port Speed: 1 Gbit
* Bandwidth: 100TB Premium Transfer
* Memory: 16GB DDR3 ECC RAM
* Primary Hard Drive: 2 x 1TB SATA
* Operating System: Linux/Windows*
* Free IPs: 5 Usable IPv4 (/29) / IPv6: /64
* DDoS Protection: Automated Detection + Null Routing
* 100% Network Up-Time: Power, Cooling Availability
* DC Location: MO, US
Monthly Price: £144.95/m Now Only £87/m | Setup Fee: Waived, Limited Quantity While Stock Lasts

DEPLOY NOW – Dual Intel Xeon 5520

▐▌▐▌ Intel Xeon E3-1230v2

* CPU: 3.6GHz Turbo: 4 Cores/8 Threads
* Port Speed: 1 Gbps Dedicated Port
* Bandwidth: 100TB Monthly Transfer
* Memory: 32 GB DDR3 RAM
* Drives: 480 GB SSD
* Operating System: Linux/Windows*
* Free IPv4: 5 Usable IPs (/29)/ IPv6: /64
* Server Management: Self-Managed
* 100% Up-Time: Network, Power Cooling,
* DC Location: MO, US
Monthly Price: £199/m Now Only £119/m | Setup Fee: Waived, Limited Quantity While Stock Lasts

DEPLOY NOW – Intel Xeon E3-1230v2

Frequently Asked Questions:

1. Where are your DC located?
Our DC is located at Missouri, US.

2. Which payment method you are accepting?
We are accepting payment via PayPal, PayZa, Skrill, Bitcoin, Debit/Credit Cards.

3. How long it will take to setup a server?
Your custom server will be setup in 1-2 Business Days.

If you have any questions please feel free to contact us. Visit our website for more information about INSTANT DEDICATED SERVERS.

Getting Started With the Dolphin: MySQL 101 – Full Setup and How to Guide

How to Setup MySQL - A Full Setup and How to GuideMariaDB and PostgreSQL are the two leading SQL databases. Both adhere to many ANSI SQL standards, but these ANSI standards don’t specify all behaviors. The SQL statement themselves (such as SELECT, INSERT, UPDATE, and DELETE) are the areas where they have the most commonality. Where they differ the most is in their DDL (data definition language) commands, and the administrative/server components. In this tutorial, we’ll cover MySQL.

MariaDB is a fork of MySQL. MySQL was originally an independent company but when they were acquired by Oracle, some users got the willies and forked the project to start MariaDB. Both products (MySQL and MariaDB) have continued to be developed. In this tutorial, we’ll focus on MariaDB, which is the more license-friendly option. Note that while the product is called MariaDB, you will still see the term “mysql” in many areas, such as directory paths (/var/lib/mysql), etc.

To install MariaDB on Debian systems:

apt-get install mariadb-server

On CentOS systems:

yum -y install mariadb-server

After installing MariaDB, you should immediately run mysql_secure_installation to secure the MySQL configuration. You should set a root password and answer yes to all questions.

# mysql_secure_installation 
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? (Y/n) y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? (Y/n) y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? (Y/n) y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? (Y/n) y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? (Y/n) y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
#

MariaDB is installed with reasonable defaults.

On CentOS systems, /etc/my.cnf is the main configuration file, and it sources files in /etc/my.cnf.d. There’s no need to edit /etc/my.cnf. Instead, edit the relevant files in /etc/my.cnf.d.

On Debian systems, configurations are stored in /etc/mysql.  mariadb.cnf is the “mother” file, which sources files from /etc/mysql/conf.d/mariadb.  /etc/mysql/mariadb.cnf explains priority with a refreshing clarity the, ahem, “enterprise” distribution seems incapable of:

# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.

MariaDB starts and starts like a normal systemd service:

systemctl start mariadb
systemctl stop mariadb

Note that for legacy compatibility purposes, “systemctl start|stop mysql” continues to work.

Normally you would connect to MariaDB with a command like this:

$ mysql -u username -p somedb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 45708
Server version: 10.3.17-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB (employees)>

If connecting from an application, note that by default PostgreSQL runs on port 3306.

In MySQL, the system ‘root’ account is the superuser.

mysql -u root -p

And then enter your password when prompted.

If you are scripting MariaDB (perhaps for backups), you can eliminate the need to enter a password. To do this, create a .my.cnf password in the relevant user’s home directory. It must be owned by that user and set to read/write by that user only:

# touch /root/.my.cnf
# chmod 600 /root/.my.cnf

Then populate it with something like this:

(client)
password = "my-password"

Now you can simply call “mysql” and (if you’re root) you’ll be logged in as root.  Note that if you execute “mysql -p”, MariaDB will ask for your password since you asked it to.

MariaDB supports the venerable mysqldump program, which dumps your database to a .sql file that contains the SQL instructions for recreating the database. Basic usage for dumping a database called ‘mydb’ looks like this:

mysqldump mydb > /some/path/mydb.sql

To dump all databases:

mysqldump -A > /some/path/all.sql
# mysql
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 45704
Server version: 10.3.17-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB ((none))> create database new1;
Query OK, 1 row affected (0.000 sec)
MariaDB ((none))> use new1;
Database changed
MariaDB (new1)>

MariaDB users are in the form “user@place” where “place” can be a hostname or “%” for wildcard. We typically create a user and grant the user permission a database:

MariaDB (new1)> create user 'someone'@'localhost' identified by 'something';
Query OK, 0 rows affected (0.000 sec)

MariaDB (new1)> grant all on new1.* to 'someone'@'localhost';
Query OK, 0 rows affected (0.001 sec)

We can also do this in one step:

MariaDB (new1)> grant all on new1.* to 'someone'@'localhost' identified by 'something';
Query OK, 0 rows affected (0.000 sec)

Regardless of how you do it, be sure to flush privileges when you’re done:

MariaDB (new1)> flush privileges;
Query OK, 0 rows affected (0.001 sec)

To list databases, use the show databases command:

MariaDB (new1)> show databases;
+--------------------+
| Database           |
+--------------------+
| employees          |
| information_schema |
| mysql              |
| new1               |
| performance_schema |
| tester             |
+--------------------+
6 rows in set (0.001 sec)

To list tables, use show tables:

MariaDB (employees)> show tables;
+----------------------+
| Tables_in_employees  |
+----------------------+
| current_dept_emp     |
| departments          |
| dept_emp             |
| dept_emp_latest_date |
| dept_manager         |
| employees            |
| salaries             |
| titles               |
+----------------------+
8 rows in set (0.000 sec)

Creating tables is a very standard SQL command. In this case, we are setting the ‘id’ column to be the primary key and also declaring it as auto-increment, which means that it will automatically increase with every insert.

CREATE TABLE superheroes (
id integer primary key auto_increment,
hero_name varchar(30),
secret_identity varchar(30),
team varchar(30)
);

MariaDB (heroes)> CREATE TABLE superheroes (
-> id integer primary key auto_increment,
-> hero_name varchar(30),
-> secret_identity varchar(30),
-> team varchar(30)
-> );
Query OK, 0 rows affected (0.006 sec)

We’ll add some rows, but we don’t need to include the ‘id’ column in our insert statement because it will auto-increment for us. The “START TRANSACTION” is optional, as we’ll explain next;

START TRANSACTION;
INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Iron Man', 'Tony Stark', 'Avengers');
INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Captain America', 'Steve Rogers', 'Avengers');
INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Thor', 'Donald Blake', 'Avengers');
INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('She-Hulk', 'Jennifer Walters', 'Avengers');
INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Wolverine', 'Logan', 'X-Men');
INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Cyclops', 'Scott Summers', 'X-Men');
INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Shadowcat', 'Kitty Pryde', 'X-Men');
INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Colossus', 'Piotr Rasputin', 'X-Men');

MariaDB (heroes)> start transaction;
Query OK, 0 rows affected (0.000 sec)

MariaDB (heroes)> INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Iron Man', 'Tony Stark',
'Avengers');
Query OK, 1 row affected (0.002 sec)

MariaDB (heroes)> INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Captain America', 'Steve
Rogers', 'Avengers');
Query OK, 1 row affected (0.001 sec)

MariaDB (heroes)> INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Thor', 'Donald Blake', '
Avengers');
Query OK, 1 row affected (0.001 sec)

MariaDB (heroes)> INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('She-Hulk', 'Jennifer Wal
ters', 'Avengers');
Query OK, 1 row affected (0.001 sec)

MariaDB (heroes)> INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Wolverine', 'Logan', 'X-
Men');
Query OK, 1 row affected (0.001 sec)

MariaDB (heroes)> INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Cyclops', 'Scott Summers
', 'X-Men');
Query OK, 1 row affected (0.001 sec)

MariaDB (heroes)> INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Shadowcat', 'Kitty Pryde
', 'X-Men');
Query OK, 1 row affected (0.001 sec)

MariaDB (heroes)> INSERT INTO superheroes (hero_name, secret_identity, team) VALUES ('Colossus', 'Piotr Rasput
in', 'X-Men');
Query OK, 1 row affected (0.001 sec)

We’re in the middle of a transaction thanks to the START TRANSACTION statement. From our perspective, this is what the superheroes table looks like:

MariaDB (heroes)> select count(*) from superheroes;
+----------+
| count(*) |
+----------+
| 8        |
+----------+
1 row in set (0.000 sec)

However, logging in from another session and running the same query produces this:

MariaDB (heroes)> select count(*) from superheroes;
+----------+
| count(*) |
+----------+
| 0        |
+----------+
1 row in set (0.000 sec)

This is because we haven’t committed the data yet. Let’s do so.

MariaDB (heroes)> commit;
Query OK, 0 rows affected (0.002 sec)

Now both queries show:

MariaDB (heroes)> select count(*) from superheroes;
+----------+
| count(*) |
+----------+
| 8        |
+----------+
1 row in set (0.001 sec)

If you had not used “START TRANSACTION”, then every command would immediately commit.

Let’s try one more transaction. I’m going to delete one of the heroes:

START TRANSACTION;
DELETE FROM superheroes WHERE hero_name = 'Thor';

MariaDB (heroes)> start transaction;
Query OK, 0 rows affected (0.000 sec)

MariaDB (heroes)> DELETE FROM superheroes WHERE hero_name = 'Thor';
Query OK, 1 row affected (0.001 sec)

MariaDB (heroes)> select count(*) from superheroes;
+----------+
| count(*) |
+----------+
| 7        |
+----------+
1 row in set (0.000 sec)

However, in the other session, I still see all rows:

MariaDB (heroes)> select count(*) from superheroes;
+----------+
| count(*) |
+----------+
| 8        |
+----------+
1 row in set (0.000 sec)

I could COMMIT in session #1, but I also have the option to ROLLBACK – in other words, abandon my changes. In this case, it’s only one statement, but I could have hundreds or thousands of statements pending commit. A COMMIT would apply them all, and a ROLLBACK would roll them all back. In this case, I’ll rollback:

MariaDB (heroes)> rollback;
Query OK, 0 rows affected (0.002 sec)

MariaDB (heroes)> select count(*) from superheroes;
+----------+
| count(*) |
+----------+
| 8        |
+----------+
1 row in set (0.001 sec)

To query data, we use SELECT in the from “SELECT (columns) FROM (table)” and then optionally adding clauses to filter data (WHERE), group data (GROUP BY), and sort data (ORDER BY). Some examples:

MariaDB (heroes)> select secret_identity from superheroes where hero_name = 'Iron Man';
+-----------------+
| secret_identity |
+-----------------+
| Tony Stark |
+-----------------+
1 row in set (0.000 sec)

I can use “*” to mean all columns:

MariaDB (heroes)> select * from superheroes where hero_name = 'Thor';
+----+-----------+-----------------+----------+
| id | hero_name | secret_identity | team     |
+----+-----------+-----------------+----------+
| 3  | Thor      | Donald Blake    | Avengers |
+----+-----------+-----------------+----------+
1 row in set (0.000 sec)

Of course, I may have many rows:

MariaDB (heroes)> select hero_name, secret_identity from superheroes where team = 'Avengers' order by hero_nam
e;
+-----------------+------------------+
| hero_name       | secret_identity  |
+-----------------+------------------+
| Captain America | Steve Rogers     |
| Iron Man        | Tony Stark       |
| She-Hulk        | Jennifer Walters |
| Thor            | Donald Blake     |
+-----------------+------------------+
4 rows in set (0.001 sec)

I can also use various database functions to summarize data:

MariaDB (heroes)> select team, count(*) from superheroes group by team order by team;
+----------+----------+
| team     | count(*) |
+----------+----------+
| Avengers | 4        |
| X-Men    | 4        |
+----------+----------+
2 rows in set (0.001 sec)

MariaDB uses a standard DELETE statement:

MariaDB (heroes)> delete from superheroes where team = 'X-Men';
Query OK, 4 rows affected (0.002 sec)

Perhaps She-Hulk decides to leave the Avengers (nerds: she joined in Avengers #221 and left in Avengers #243):

MariaDB (heroes)> update superheroes set team = NULL where hero_name = 'She-Hulk';
Query OK, 1 row affected (0.002 sec)
Rows matched: 1 Changed: 1 Warnings: 0

MariaDB (heroes)> select hero_name from superheroes where team = 'Avengers' order by hero_name;
+-----------------+
| hero_name       |
+-----------------+
| Captain America |
| Iron Man        |
| Thor            |
+-----------------+
3 rows in set (0.000 sec)

Learning More

raindog308

I’m Andrew, techno polymath and long-time LowEndTalk community Moderator. My technical interests include all things Unix, perl, python, shell scripting, and relational database systems. I enjoy writing technical articles here on LowEndBox to help people get more out of their VPSes.