# MySQL with Beziersql

**URL:** <https://discourse.processing.org/t/mysql-with-beziersql/37129>\
**Category:** Libraries\
**Created:** [May 27, 2022, 3:19am UTC](https://discourse.processing.org/t/mysql-with-beziersql/37129 "2022-05-27T03:19:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdmiralPenguin2](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@AdmiralPenguin2](https://discourse.processing.org/u/AdmiralPenguin2)\
**Post date:** [May 27, 2022, 3:19am UTC](https://discourse.processing.org/t/mysql-with-beziersql/37129/1 "2022-05-27T03:19:37Z")

</div>

Hi, I’m trying to use Processing with MySQL using the BezierSQL library but it isn’t working. I entered the password, user, database, and host correctly and it still says SQL.connect(): Could not connect to the database ( jdbc:mysql://127.0.0.1/lab8 )

```auto
import de.bezier.data.sql.*;

MySQL db;

void setup()
{
    size( 100, 100 );
    String host = "127.0.0.1";
    String user = "root";
    String pass = "penguin";
    String database = "lab8";
    db = new MySQL( this, host, database, user, pass ); // open database file
    db.setDebug(false);

    if ( db.connect() )
    {
        String[] tableNames = db.getTableNames();
        
        db.query( "SELECT * FROM %s", tableNames[0] );
        
        while (db.next())
        {
            TableOne t = new TableOne();
            db.setFromRow( t );
            println( t );
        }
}

```

---

<div class="post-metadata">

**Author:** ![The\_Traveler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/the_traveler/32/16252_2.png) [@The\_Traveler](https://discourse.processing.org/u/The_Traveler)\
**Post date:** [May 27, 2022, 11:23am UTC](https://discourse.processing.org/t/mysql-with-beziersql/37129/2 "2022-05-27T11:23:37Z")

</div>

Welcome. Which version of Processing and what OS are you using? Did you run any of the MySQL example code and did it work correctly?
