The Ultimate Guide to mysqldump

The Ultimate Guide to mysqldump

https://ift.tt/38BF0bN


Introduction

All complex applications require a database of some sort to store information.
MySQL is one of the most popular databases that is used on the web. Most of a businesses
time and value is put into a database and its key to keep that data secure. SnapShooter uses
MySQL to help manage and backup customers servers and databases.

In this guide we will explore the mysqldump utility in depth. We cover the ways
you can make a backup as well as the common errors users experience when using it.

Table of Contents

What is mysqldump?

MySQL is an open-source and one of the most widely used relational database
management system. It is used to store anything from a simple name to a picture gallery or a
large amount of information in a network. mysqldump is a part of the MySQL
relational
database package that is used to dump (backup) a database or a collection of databases into
a simple text file. The text file is a set of SQL statements that are used to reconstruct
the database to its original state.

Generally, mysqldump is used to export the database to a backup file (like we
do at SnapShooter) and also
used to move the database to the other host. The mysqldump command also generates output in
XML, CSV and other delimited text formats.

Basic How to use MySQL Dump

The basic syntax of Mysqldump command is shown below:

mysqldump -u USERNAME -pPASSWORD DBNAME > DBBACKUP.sql
mysqldump -u USERNAME -pPASSWORD --databases DB1 DB2 DB3.. >DBBACKUP.sql
mysqldump -u USERNAME -pPASSWORD --all-databases > ALLDBBACKUP.sql

A brief explanation of each option is shown below:

-u It specifies your MySQL username.
-p It specifies your MySQL password.
DBNAME A name of the database that you want to backup.
DBBACKUP.sql The name of the backup file you want to generate.
-h It specifies the hostname of the MySQL database server.
–databases It is used to determine the database.
-all-databases It is used to backup all databases.
–default-auth=plugin It is used to specify the client-side authentication plugin to
use.
–compress It is used to enable compression in server/client protocol.
-P It is used to specify the port number to use for MySQL
connection.
How to Backup Single MySQL Database

The simple and easiest way to take a backup of a single database, run the following command:

mysqldump -u root -ppassword wpdb > wpdb_backup.sql

This command will dump the database named wpdb and generate a single file named
wpdb_backup.sql.

How to Backup Multiple MySQL Databases

With mysqldump, you can also take a backup of multiple databases to a single file.

For example, dump the database named wpdb1, wpdb2 and wpdb3 and generate a single backup
file
named wpdb_backup3.sql, run the following command:

 mysqldump -u root -ppassword --databases wpdb1 wpdb2 wpdb3 > wpdb_backup3.sql
How to Backup All MySQL Databases

Mysqldump also allows you to backup all databases in your system.

For example, take a backup of all databases and generate a single backup file
named
alldb_backup.sql, run the following command:

mysqldump -u root -ppassword --all-databases > alldb_backup.sql
How to Backup Only Structure MySQL Databases

If you want to generate the backup of the database structure, then you must use
the –no-data
option in the mysqldump command.

For example, it generates the backup of the database structure of the wpdb
database run the
following command:

mysqldump -u root -ppassword --no-data wpdb > wpdb_backup.sql
How to Backup single MySQL table

If you want to generate the backup of the specific table, you will need to
specify the table
name after the database name.

For example, generate the backup of the wptable table of the wpdb database, run
the following
command:

mysqldump -u root -ppassword --no-data wpdb wptable > wpdbtable_backup.sql
How to Backup MySQL with no structure

If you want to generate the backup of the data without the database structure,
then you must use
the –no-create-info option in the mysqldump command.

For example, generates the backup of data of the wpdb database, run the
following command:

mysqldump -u root -ppassword wpdb --no-create-info > wpdb_backup.sql

Basic How to Import a mysqldump

The simple and easiest way to import the database using the following command:

mysql -u root -ppassword wpdb < wpdb_backup.sql

Note: You will need to create an empty database on the target machine before
importing database.

You can also import the database with mysqlimport command if you want to
restore a database that already exists on the targeted machine.

mysqlimport -u root -ppassword wpdb < wpdb_backup.sql

If you want to import all databases, run the following command:

mysql -u root -ppassword < alldb_backup.sql

MySQLDump what does the –quick flag do?

mysqldump works by retrieving and dumping table contents row by row or
retrieving the entire
content from a table and buffer it in memory before dumping it. This will cause a problem if
you
are exporting large tables.

Use mysqldump command with –quick flag reads out large tables in a way that doesn’t require
large amounts RAM to fit the full table in memory. This will provides extra safety for
systems
with little RAM and large databases.

Can you use Where clause with MySQLDump?

Of course, it’s easy to use a where clause with mysqldump command. If you have a
database with lots of tables and each table has a billion records, and if you want the
records for a specific year, then you can use where clause with mysqldump command. Where
clause allows you to pass a string for the condition and fetch the specific records as you
need.

For example, fetch all records from the table named mytable and database named
wpdb where the field date_created is greater than ‘2018-02-01’, run the following command:

mysqldump -u root -ppassword wpdb --tables mytable --where="date_created > '2018-02-01' " > wpdb_myrecord.sql

mysqldump Common Errors and Fixes

mysqldump: error 2013: lost connection to mysql
server during query when dumping table?

You should increase the max_allowed_packet, net_write_timeout, net_read_timeout
and innodb_buffer_pool_size value to appropriate levels to fix the error.

To set the above value, edit the MySQL configuration file :

nano /etc/mysql/my.cnf

Add the following lines under the [mysqld] and [mysqldump] section:

[mysqld]
innodb_buffer_pool_size=100M
max_allowed_packet=1024M

[mysqldump]
max_allowed_packet=1024M
net_read_timeout=3600
net_write_timeout=3600

Save and close the file when you are finished. Then, restart the MySQL service to effect the
changes.

service mysql restart

Or

systemctl restart mysqld

mysqldump: error 2020: got packet bigger than ‘max_allowed_packet’ bytes when dumping table?

When the database you are trying to backup is very large, and the
max_allowed_packet value was set to a low value. This will cause the above error.

You can fix the error by editing the MySQL configuration file:

nano /etc/mysql/my.cnf

Increase the max_allowed_packet value the under the [mysqld] and [mysqldump]
section

[mysqld]
max_allowed_packet=your-desired-value

[mysqldump]
max_allowed_packet=your-desired-value

Save and close the file when you are finished. Then, restart the MySQL service to effect the
changes.

service mysql restart

Or

systemctl restart mysqld

mysqldump when using lock tables?

By default, mysqldump command will perform a lock on all tables until the
backup is complete. But this is a poor option in a live environment where the database is
extensive, and uptime is necessary.

Primarily it’s used for protection of data integrity when dumping MyISAM tables. MyISAM
tables
require this locking because they don’t support transactions.
If you use a mix of MyISAM and InnoDB tables, then dump your MyISAM tables separately from
InnoDB tables using --lock-tables option.

InnoDB is the default table storage engine nowadays. So you can skip the lock
tables option by
using --skip-lock-tables to stop the behaviour and
--single-transaction to run mysqldump within
a transaction.

Couldn’t execute ‘show create table x’ Table
does not exist (1146)

Some times the table was deleted during the backup process. In that case, you can restrict
certain tables from the mysqldump command using the –ignore-table option.

You will need to specify both database and table names as shown below:

mysqldump -u root -ppassword dbname --ignore-table=tablename > db_backup.sql

You can also ignore the multiple tables by specifying the option per table as
shown below:

mysqldump -u root -ppassword dbname --ignore-table=table1 --ignore-table=table2 > db_backup.sql

mysqldump unknown database when selecting the
database

Usually, this error occurs when you specify the password on the command line with -p flag
and there is a space between -p and password.

For example, if you want to dump the database named wpdb using the user “root”
and password “your-password”, and use the following command:

The above command will produce an error says ""Unknown database your-password" when selecting the database".

Actually, you must specify the password with no space after -p switch as shown
below:

mysqldump -u root -pyour-password wpdb > wpdb_backup.sql

mysqldump got error 1044 when selecting the
database

You will get this error if you are trying to dump the database with the user which has not
enough privileges to access the selected database.

To fix this error, assign proper privileges to the user to access the database.

First, login to MySQL with the following command:

mysql -u root -p

Provide your MySQL root password then grant all privileges on the database to
your user:

GRANT ALL PRIVILEGES ON wpdb.* TO 'your_user'@'localhost';

Next, flush the privileges and exit from the MySQL with the following
command:

FLUSH PRIVILEGES;
EXIT;

mysqldump access denied for user when trying to
connect

There are several reasons for this error. Most common reasons for this error are
listed below:

1. Wrong mysqldump Command

One of the common reasons for this error is that when you use the wrong format
of mysqldump command.

For example, the general syntax for taking database backup using mysqldump is shown below:

mysqldump -u user -ppasword database > database.sql

You will get the above error if you take a database backup without specifying a username and
password as shown below:

mysqldump database > database.sql

You should get the following error:

mysqldump: Got error: 1045: "Access denied for user 'user' @ 'localhost' (using password: NO)" when trying to connect

2. Wrong user credentials

You will also get the above error if you use the wrong username and password
while connecting to
the database. Therefore, MySQL can’t verify the authenticity of the account and throws this
error.

3. Remote host does not allowed to connect to database

You will also see this error if you are trying to backup the database on the
remote server.
Because, remote host disallow external connections and they only allow to connect from the
localhost.

To fix this, configure your MySQL server to allow connections from the remote
host.

How to mysqldump backup large database

Some useful tips and tricks while using the mysqldump for a very large database.

1. How to Compress mysqldump Output

It is a good idea to compress the database backup in gzip format to reduce the
size of the
database.

Run the following command to dump the database named wpdb and gzip it at the
same time:

 mysqldump -u root -ppassword wpdb | gzip > wpdb_backup.sql.gz

If you want to restore the compressed database, run the following command:

gunzip < wpdb_backup.sql.gz | mysql -u root -ppassword wpdb

2. How to import the large MySQL database

First, login to the MySQL shell using the following command:

mysql -u root -p

Provide your MySQL root password then set network buffer length to a large byte
number as shown
below:

set global net_buffer_length=1000000;

Next also set maximum allowed packet size to a large byte number as shown
below:

set global max_allowed_packet=1000000000;

Next, disable foreign key checking to avoid delays, errors and unwanted
behaviour as shown
below:

SET foreign_key_checks = 0;
SET UNIQUE_CHECKS = 0;
SET AUTOCOMMIT = 0;

Next, import your dump file with the following command:

source /backup-path/wpdb.sql

Once you are done, enable foreign key checks with the following command:

SET foreign_key_checks = 1;
SET UNIQUE_CHECKS = 1;
SET AUTOCOMMIT = 1;

3. Separate databases into separate data files

If you have a large database, then you can also split them by separate into
separate data files.

You can create a new file with a list of all databases using the following
command:

mysql -u root -ppassword -A --skip-column-names -e"SELECT schema_name FROM
information_schema.schemata WHERE schema_name NOT IN ('information_schema','mysql')" >
db_list.txt

Once you have the list of databases, you can run a loop with mysqldump command
through the list
as shown below:

for DB in `cat db_list.txt`
do
mysqldump -u root -ppassword --hex-blob --routines --triggers ${DB} | gzip > ${DB}.sql.gz &
done
wait

Mysqldump without password

When you dump a database with mysqldump, you will need to specify a username and
password with the command. If you don’t want to specify a username and password with
mysqldump command every time, you just need to create a file in your home directory with
MySQL credential. This will disable the mysqldump password prompting.

To do so, create a new file in your home directory:

nano ~/mysql.txt

Add your MySQL root credential, as shown below:

[mysqldump]
user=root
password=password

Save and close the file when you are finished.

Now, you can specify your MySQL credential file using the option –defaults-file
as shown below:

mysqldump --defaults-file=~/mysql.txt wpdb > wpdb_backup.sql

programming

via Laravel News Links https://ift.tt/2dvygAJ

July 5, 2020 at 10:24PM

Friday Funnies: The sunset edition

Friday Funnies: The sunset edition

https://ift.tt/2VO17qf

And you can blame this post 100% on Eve’s Hubby who sent the links

guns

via https://gunfreezone.net

June 5, 2020 at 06:07PM

You’ll Look Forward to Cutting the Lawn When You Turn Your Riding Mower Into a Tank

You’ll Look Forward to Cutting the Lawn When You Turn Your Riding Mower Into a Tank

https://ift.tt/2NPq1kW


A house with a sprawling lawn might be the aspiration of anyone stuck in a tiny apartment, but there’s a downside to that dream: your lawn doesn’t cut itself. To make the weekly chore more bearable, Jason Hibbs of Bourbon Moth Woodworking turned his riding mower into a miniature tank that mows down everything in its path—not just grass.

Hibbs’ tank wouldn’t survive a minute on the battlefield, after all his expertise is with lumber, not armor plating. But even with reduced visibility given the driver hides inside while peering out a small window (the turret has an opening lid if you’re willing to stand while driving) a riding mower suddenly becomes something you’ll want to drive, even if it’s just in criss-cross patterns across your lawn.

The tank isn’t to scale, so Hibbs can probably expect a critique or two from anyone who’s watched a History Channel World War II documentary, but in addition to authentic looking treads that actually roll, he’s gone the extra mile to incorporate a working potato cannon into the barrel. It doesn’t help much with the mowing, but it’s a good way to keep the neighbors off your lawn after you’re done meticulously manicuring your green space.

Thanks, Tom!

geeky,Tech

via Gizmodo https://gizmodo.com

July 3, 2020 at 04:12PM

A Clever Design for a Folding Ladder

A Clever Design for a Folding Ladder

https://ift.tt/2VFkFNH

A frequent UX fantasy I have: I want occasional-use products to disappear when I don’t need them. Ladders evoke this feeling often; we’ve got three on the property that we use regularly, and all three are a PITA to store and transport.

So after seeing this cleverly-designed Murphy Ladder, I covet it:

fun

via Core77 https://ift.tt/1KCdCI5

July 2, 2020 at 12:27PM

Tabler Icons: A Set of Over 500 free MIT-licensed SVG Icons

Tabler Icons: A Set of Over 500 free MIT-licensed SVG Icons

https://ift.tt/3ilC5Zb


Tabler Icons is a set of over 550 free MIT-licensed high-quality SVG icons for you to use in your web projects. You can add Tabler Icons to your project via an NPM module, or paste the SVG code directly in HTML:

<svg xmlns="http://www.w3.org/2000/svg" 
    class="icon icon-tabler icon-tabler-disabled" 
    width="24" height="24" viewBox="0 0 24 24" 
    stroke-width="1.25" stroke="currentColor" fill="none" 
    stroke-linecap="round" stroke-linejoin="round">
      ...
  </svg>

Alternatively, the project comes with an SVG sprite:

<svg width="24" height="24">
  <use xlink:href="path/to/tabler-sprite.svg#tabler-activity"/>
</svg>

Using the stroke-width CSS property, you can get different icon variants based on the stroke width you need:

Learn More

To learn more about this package, get full installation instructions, and view the source code on GitHub at tabler/tabler-icons. Also, check out Tabler UI Kit, a premium open-source dashboard template based on Bootstrap.

Filed in:
News

programming

via Laravel News https://ift.tt/14pzU0d

July 2, 2020 at 09:07AM

Best Ammo Brands for Plinking, Accuracy, & Self-Defense

Best Ammo Brands for Plinking, Accuracy, & Self-Defense

https://ift.tt/2VC7Tz8

Is your favorite brand of ammo out of stock and you’re wondering what to buy instead?

Tested 6.5 Creedmoor Ammo
A collection of 6.5 Creedmoor we use for testing

Let’s talk about the best ammo brands out there for hunters, target shooters, and those looking to defend themselves

With times being what they are, many of us are thinking about stocking up on ammo.

If you’re looking for another brand because your preferred flavor isn’t available, or you just want an idea of which brands suck and which ones don’t, here’s an overview of the best ammo brands around.

Bullet Farmer Mad Max
Those who bought ammo BEFORE it all sold out

Just because something isn’t on this list doesn’t mean it isn’t good ammo, it may just mean it’s a little overpriced, hard to get a hold of, or ya know… maybe it sucks. Still, there’s plenty of good ammo out there.

But the best is right here.

Spicy Memes
You heard us–the BEST.

Ed. note: This isn’t in order of best to worst–just the order we felt like typing it in. We know you like Hornady best, but please be gentle in the comments. We have feelings, too. <3

And yes…almost everything is sold out but stock is slowly trickling in…

Best Ammo Brands

1. Federal Premium

Federal Premium Ammunition has been around in one form or another since the 1920s, and they’ve become one of the premier ammunition manufacturers during that time.

Federal Logo
Federal Logo

They’re so prolific, you’re almost guaranteed to find Federal ammo on the shelf just about anywhere ammo is sold (assuming the panic buyers haven’t snapped it all up).

federal american eagle
Federal American Eagle Ammo

No matter what type of ammo you’re looking for, they’re sure to have some options available, from cheap birdshot and plinking-grade .22LR all the way up to more expensive match-grade centerfire rifle ammo for you PRS folks out there that don’t reload your own.

SW22 with Federal .22LR
SW22 with Federal .22LR

Gold Medal Match is a good option if you’re looking to hit something really, really far away.

They also have several of their own calibers floating around, such as the .224 Valkyrie that was all the rage a few years ago, and some other more esoteric things like the .327 Federal Magnum.

No, that’s not a typo. It really is a thing that exists and its for… stuff.

.327 Federal Magnum
.327 Federal Magnum compared to other .32 calibers

Ostensibly, it’s another stab at .357 magnum power with a smaller cartridge, which allows for a full six shots in a revolver where .357 magnum would leave you with just 5.

Should you rush out and buy one? Maybe not, but it is pretty cool, and I bet none of your buddies have one. And don’t worry, Federal and other manufacturers make plenty of defensive and target loads for it.

Federal American Eagle 5.7x28mm
Federal American Eagle 5.7x28mm

Finally, their American Eagle line (the red box on every ammo shelf) is a great budget option that can really run with some of the more expensive stuff, particularly their 9mm and .45 ACP.

Some Federal ammo that might be in stock:

2. CCI

Cascade Cartridges, Inc has been around since 1951, when the company was founded by Richard Speer (brother of Vernon Speer from… Speer, which we’ll cover next) and Arvid Nelson.

CascadeCartridgeIncLogo
Cascade Cartridge Inc Logo

If you haven’t heard of CCI, or at least seen it on store shelves, you’ve probably never bought any ammo at all. They are probably the biggest name in rimfire ammo, and with good reason.

Richard Speer
Richard Speer

Their Stinger and Standard Velocity .22LR are two of the most popular rounds on the planet, and you can find them for sale just about everywhere.

cci ammo
CCI/Speer Bulk Ammo is a popular pick for plinking!

Their Mini-Mag .22LR is also one of the best of the best, and is an industry-standard. For this reason, they’re mostly associated with rimfire ammo, including .22LR, .22WMR, and .17HMR. As far as the latter goes, their V-Max stuff is top-notch.

They don’t just make awesome rimfire ammo though. Far from it in fact. CCI actually makes one of our most-beloved handgun practice ammo lines, Blazer Brass.

Our favorite practice ammo

This is some of the best budget-friendly centerfire ammo on the market, and you best believe we’ve shot many, many thousands of rounds of it. For cheap plinking ammo that could do as competition ammo in a pinch, it’s not bad.

Check out some possibly in-stock CCI ammo:

3. Speer

Speer is owned by the same parent company as CCI (and just about every other shooting sports and outdoors company on the market) and as I mentioned was founded by Vernon Speer, brother of Richard Speer, the founder of CCI.

Speer Logo
Speer Logo

The idea, at least as I was told, was that CCI would make cartridges and primers and Speer would make bullets. Today, Speer does make a lot of bullets, and they’re very popular with reloaders, but they also make some really excellent high-end defensive ammo.

Vernon Speer and Jack O'Connor
Vernon Speer (left) and Jack O’Connor

They’re actually one of the premier manufacturers of defensive ammo in general, and many major police departments and government agencies trust Speer hollowpoints above all else.

Speer 230 gr Gold Dot
Speer 230 gr Gold Dot

Speer is so beloved by LEO shooters that they actually have a line of ammo called “Lawman” that’s designed specifically for duty use.

Speer Lawman 357 sig
Speer Lawman 357 sig

They also make the ever-popular Gold Dot line that is one of the industry standards for carry ammo (I happen to have them loaded up right now in fact).

Speer Gold Dot 45 ACP 185gr
Speer Gold Dot 45 ACP 185gr

Oh, and just like CCI, they make all their stuff right here in the USA. Lewiston, Idaho to be specific. 

4. Sellier & Bellot

Sellier & Bellot, or “S&B” as you’ll see it a lot, is a Czech manufacturer that has been making ammunition since the days of percussion caps.

Sellier & Bellot Ammo
Sellier & Bellot Ammo Logo

They’re actually one of the oldest continuously-functioning companies in the entire world. They made a lot of the percussion caps for the French infantry following the death of Napoleon. 

In other words, while the name may be unfamiliar to those outside Europe, Sellier & Bellot is a company worth being aware of. 

They make a huge variety of ammunition, including some really excellent match-grade stuff and high-end hunting ammo. Their line of hunting ammo topped with SBT Gameking bullets is a great choice for hunters looking for extra precision.

Their huge catalog also includes things 6.5×55 and 303 British, so if you have an older European gun, particularly a milsurp of some kind, there’s a good chance they make ammo for it.

S&B 303 British
S&B 303 British

Really, there’s a good chance they’ve been making ammo for it since the beginning!

5. Prvi Partizan 

Prvi Partizan is another European manufacturer worth knowing. They are another company with a long history, going back to 1928. They’re a Serbian company that primarily made ammunition for the Serbian Army and national police units.

Prvi Partizan Logo
Prvi Partizan Logo

Today, Prvi Partizan ammo is available all over the world, including your local sporting goods store.

They are actually the third largest ammo supplier to the US believe it or not, so you should have no trouble finding their products.

And if you happen to have, say, a rifle you picked up at a gun show that’s chambered in something ridiculous like 7.65x53mm Argentine, there’s a good chance Prvi Partizan makes rounds for it. 

7.65x33 Argentine
Prvi Partizan 7.65×33 Argentine

They’re actually one of the only manufacturers that actually makes 8mm Lebel anymore, so if you have one of those historic guns and you actually want to shoot the damn thing, Prvi Partizan is a great place to start looking.

PPU 8x50 Lebel
PPU 8×50 Lebel

Of course, they also make some more standard offerings as well, and they’re all rock solid.

PPU Ammo
Seriously–they make everything.

Prvi Partizan is one of the easier-to-find budget plinking options around us, and I bet you can get your hands on some as well. It’s definitely military-grade stuff and it’s a long way from match quality, but it does go bang every time.

6. Wolf

Oh Wolf.

If you know anything about ammo, you know that Wolf, like Tula below, is not necessarily a byword for quality. They produce primarily steel-cased rounds for military firearms.

WolfWPALogo
Wolf Logo

If you’re looking for 9mm, 5.56, or 7.62 and you aren’t going to be defending life and liberty with them, Wolf isn’t so bad.

Yes, it’s low-quality ammo. No, it’s not going to stand up against the more expensive offerings, even Prvi Partisan’s budget stuff. But it’s also cheaper. Much cheaper, in some cases.

very cheap
@ Tula and Wolf

And let me be clear, the stuff is not dangerous. Well, to the shooter, assuming they’re following proper firearms safety.

They mostly make FMJ ammo so not the best options for hunting or self-defense, but there’s something to be said for the “buy it cheap and stack it deep” mentality, particularly if you’re looking for training ammo.

mini-gun at battlefield vegas
If you shoot like this at the range, you’re gonna want Wolf ammo.

And that’s why Wolf (and Tula) are on this list of “Best” manufacturers. When you want to rip through 200 rounds at the range with your buddies without having to hide the credit card bill, look no further.

There’s a certain gleeful joy in turning money into noise, and we’d be the first to admit that sometimes you have to pew pew just for the sake of pew pew.

wolf 223 steel
Wolf .223 steel case

So with that in mind, remember that just because something isn’t the top of the line, that doesn’t mean it isn’t worth your time. In the case of Wolf, if you’re looking for ammo that goes bang and won’t break the bank, look no further.

7. TulAmmo

Unless, of course, you’d rather pick up some TulAmmo. TulAmmo is made by Tula, a Russian arms company about three hours drive South of Moskow.

TulAmmo Logo
TulAmmo Logo

You Mosin Nagant fans probably recognize the name and yes, this is the company that made several bajillion Mosins for the Russian army. This company helped beat the Nazis.

100 Nazi Scalps
100 Nazi Scalps, courtesy of Tula!

Today, their ammo is widely known as one of the better cheap and cheerful options when it comes to plinking rounds.

Until about a decade ago they actually made all of Wolf’s ammo, so they’re very similar but I’ve always had better luck with TulAmmo. Your mileage may very.

Tulammo
Tulammo

That said, both are good, both specialize in polymer-coated, steel-cased ammo in military calibers, neither are going to win any accuracy awards, and neither will cause you to spend very much money when you want to go shoot something.

Overall, don’t tear yourself up choosing between the two. Go with the cheaper option, that’s what you’re here for right?

8. Hornady

Hornady is a name you’re probably already aware of, but we’re going to talk about them anyway just in case because holy crap they make good stuff.

Hornady Logo

Seriously, Hornady is far and away the best major manufacturer of premium ammo. There might be better stuff out there in some cases, but for sheer consistency and availability, Hornady takes the gold medal here.

If you’re looking for off-the-shelf ammo that can compete with hand loaded stuff, this is the place to start your search.

Hornady ELD Match 140gr 6.5 Creedmoor
Hornady ELD Match 140gr 6.5 Creedmoor

Their ELD-M line of centerfire rifle ammo is particularly good and is a favorite around the office for testing long-range setups, especially in 6.5 CM, .308 Win, and other rifle cartridges in that class. They developed 6.5CM so it makes sense they’d do well with it.

(Insert Obligatory Creedmoor Meme)

Beyond that, Hornady makes some of the finest defensive munitions ever devised by man, with their Critical Defense and Critical Duty lines both being extremely popular with concealed carriers and police officers respectively.

Hornady Critical Defense 9mm, post-firing

9. Winchester

Winchester is a legend in the gun world, and their ammo is a big part of that reputation. “Winchester white box” is the gold standard for a middle-of-the-road ammo offering almost anywhere you go. 

Winchester Logo
Winchester Logo

They began making ammo back in 1873 and were one of the first companies to really bring together ammo and firearms manufacturing. They’re responsible for helping make firearms such an institution in America, particularly after the first World War.

7-62x39-123-grain-fmj-winchester-usa-20-rounds
Winchester White Box 7.62x39mm

Winchester makes their products in Alton, Illinois, and that includes their rifle, pistol, and shotgun offerings.

Besides their standard “white box offerings that come in every common caliber you can imagine, plus several 12-gauge flavors as well, they have defensive ammo in their Silvertip line and they leaned into the law-enforcement market with the Active Duty line.

Winchester Active Duty 115gr 9mm
Winchester Active Duty 115gr 9mm

Rest assured, whatever ammo you need, you can find it in a Winchester box, and you can rest easy knowing you’re buying quality.

10. PMC

PMC ammunition is made by Poongsan Corporation (no I didn’t make that name up) in South Korea. They specialize in everything from small arms ammunition all the way up to artillery shells. In other words, if it goes boom, they know about it.

PMC Ammo Logo
PMC Ammo Logo

The company has only been around since the late 60’s, but in that short time they’ve become one of the most prevalent manufacturers in the world. 

Every piece of ammo they make is manufactured to the standard of South Korean and NATO allied militaries, so you know it’s good stuff. Not great, mind you, but no military ammo is going to win you accuracy medals.

military grade meme
Yee-up!

This is good, honest, hard-working, and dependable ammo. Very working class stuff here, and that’s why we love it.

They offer mostly centerfire rifle and pistol ammo, with an emphasis on military style FMJs. Not a lot of hunting options, but for ratting away for the apocalypse, or just general target practice, PMC is good stuff.

Check out more possible PMC ammo over at PSA.

11. Fiocchi

I’m going to end this list with one of my personal favorite ammo brands, Fiocchi

Fiocchi Logo
Fiocchi Logo

Fiocchi is an Italian company that was founded in 1876 by Giulio Fiocchi, and the company is still in Fiocchi family hands, making it one of the oldest family businesses still operating. They are based out of Lecco, Italy and their products make their way around the world. 

Fiocchi is a huge manufacturer, and they produce a genuinely staggering amount of ammo for all kinds of centerfire and rimfire firearms, but their big thing has always been shotgun shells.

fiocchi rubber buckshot
Fiocchi Rubber Buckshot for less-lethal measures

Of course, it’s a lot easier to get a hunting shotgun in most European countries, so people tend to gravitate towards those over pistols and rifles, but still. 

Fiocchi makes every kind of shotgun shell you can imagine, from cheap birdshot to serious defensive buckshot to slugs to freaking birdshot tracers for trap shooting

The company also makes handgun and rifle ammo, and like Prvi Partizan and others they make some interesting niche cartridges like the historic .455 Webley and .303 British. 

Oh, and to make things even better, even though it’s an Italian company, over 3/4ths of the ammo sold under the Fiocchi name in the US is manufactured by American workers in Missouri.

Check out some more Fiocchi at PSA.

Parting Shots

There are a number of great ammo brands out there, and hopefully, now you have a better idea of the ones that best suit your individual needs. No matter your intended purpose or budget, there’s a huge variety of manufacturers making great ammo you can use.

When you’re deciding how much ammo to keep around remember to include training time. No matter what, you have to keep your handgun skills sharp and growing.
Empty trays? Time to buy more!

There’s really never been a better time to be buying factory ammo because we, as shooters, have a broader selection of quality ammo than ever before. 

I hope if you were overwhelmed by the sheer amount of ammo manufacturers, or just wanted to know what was worth picking up at the store to try, maybe now you’ll have a better idea the next time you’re staring at the wall of cartridge boxes wondering what to spend your hard-earned dollar on.

Glock 20 and lots of ammo
G20 and plenty of ammo

What’s your favorite ammo brand? Do you have another go-to option that we didn’t include on this list? Want more links of in-stock ammo and the places to get them…check out Best Places to Buy Ammo Online!

The post Best Ammo Brands for Plinking, Accuracy, & Self-Defense appeared first on Pew Pew Tactical.

guns

via Pew Pew Tactical https://ift.tt/2m7cc0U

July 1, 2020 at 06:43PM

Declining Eyesight Can Be Improved By Looking At Red Light, Pilot Study Says

Declining Eyesight Can Be Improved By Looking At Red Light, Pilot Study Says

https://ift.tt/2VywRQi

swell shares the findings from a small pilot study that suggests a few minutes of looking into a deep red light could have a dramatic effect on preventing eyesight decline as we age. CNN reports: Researchers recruited 12 men and 12 women, whose ages ranged from 28 to 72. Each participant was given a small handheld flashlight that emitted a red light with a wavelength of 670 nanometers. That wavelength is toward the long end of the visible spectrum, and just short of an infrared wavelength, which tends to be invisible to the human eye.
They spent three minutes each day looking into the light over a period of two weeks.
The lights work on both cones and rods in the eye. Cones are photo receptor cells that detect color and work best in well-lit situations. Rods, which are much more plentiful, are retina cells that specialize in helping us see in dim light, according to the American Academy of Ophthalmology.
Researchers measured the cone function in subjects’ eyes by having them identify colored letters with low contrast. And they measured their eyes’ rod sensitivity by asking them to detect light signals in the dark. There was a 14% improvement in the ability to see colors, or cone color contrast sensitivity, for the entire two dozen participants. Improvement, however, was most significant in study participants over age 40. For those ages, cone color contrast sensitivity rose by 20% over the course of the study. That age bracket also saw significant increases in rod threshold, which corresponds to the ability to see in low light. Study participants under 40 also experienced some improvement, but didn’t see the same jump as older subjects. Younger eyes haven’t declined as much as older eyes.


Read more of this story at Slashdot.

geeky

via Slashdot https://slashdot.org/

June 30, 2020 at 08:42PM

The Best Password Managers

The Best Password Managers

https://ift.tt/3i5iHzt

The Best Password Managers

Everyone should be using a password manager. It’s the most important thing you can do—alongside two-factor authentication—to keep your online data safe. We’ve evaluated dozens of paid and free password managers and tested four, and we think 1Password offers the best combination of features, compatibility, security, and ease of use. You don’t have to pay for a good password manager, but if you can, 1Password is worth the $36 per year.

technology

via Wirecutter: Reviews for the Real World https://ift.tt/36ATBn1

June 25, 2020 at 01:35PM

Yorvi Arias: Setup ora2pg for Oracle to Postgres Migration

Yorvi Arias: Setup ora2pg for Oracle to Postgres Migration

https://postgr.es/p/4P8

An important part of performing a migration from Oracle to PostgreSQL is selecting the right tool for helping with the conversion between systems. When people ask me how they can get the migration process started, I like to recommend a powerful open source utility called "ora2pg".

As the name suggests, ora2pg is a tool that migrates Oracle (or MySQL) databases to PostgreSQL by generating compatible SQL files  As the documentation states, ora2pg “connects your Oracle database, scans it automatically and extracts its structure or data, it then generates SQL scripts that you can load into your PostgreSQL database.” 

Postgresql

via Planet PostgreSQL https://ift.tt/2g0pqKY

June 24, 2020 at 02:47PM