Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let con = mysql.createPool({
- connectionLimit: 10,
- host: "157.245.50.123",
- user: "Admin-Zotova",
- password: "Zotova123$%^",
- database: "block_explorer"
- });
- con.getConnection((err, connection) => {
- if (err) {
- if (err.code === 'PROTOCOL_CONNECTION_LOST') {
- console.error('Database connection was closed.')
- }
- if (err.code === 'ER_CON_COUNT_ERROR') {
- console.error('Database has too many connections.')
- }
- if (err.code === 'ECONNREFUSED') {
- console.error('Database connection was refused.')
- }
- }
- if (connection) connection.release();
- });
- module.exports = con;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement