To access your MySQL database from your Perl scripts, you can provide the following database server name in your connection string:
localhost
For MySQL 8, the database server name is the same, but you will need to set the connection port to 3308.
Here are example connection strings for MySQL 5:
DBI->connect('DBI:mysql:localhost:database=mysql_database', 'mysql_user', 'mysql_password') or die "Database connection failed";
and MySQL 8:
DBI->connect('DBI:mysql:localhost:database=mysql_database;port=3308', 'mysql_user', 'mysql_password') or die "Database connection failed";
You can find the correct database server settings for MySQL 8 for some of the most popular software applications in our MySQL 8 database server settings article.
All prices are in USD. No setup fees. Minimum contract period for hosting plans - 1 month. Full prepayment for the contract period. Money‑back guarantee: 15 days for accounts purchased for 1 month and 100 days for accounts on annual billing. Automatic renewal is optional. Fees for domain registrations and SSL certificates cannot be refunded in case of an early contract termination.
ICDSoft 2001-2026 © All rights reserved
Terms of Use
|
Legal notice
|
Privacy
|
Reseller terms
|
Cookies