Error migration to my local mysql server

I am using a local mysql server ver 5.1. Here my configuration file, as described in the book chapter 6 with my parameters.

import FluentMySQL

import Vapor

/// Called before your application initializes.
public func configure(_ config: inout Config, _ env: inout Environment, _ services: inout Services) throws {
/// Register providers first
try services.register(FluentMySQLProvider())

/// Register routes to the router
let router = EngineRouter.default()
try routes(router)
services.register(router, as: Router.self)

/// Register middleware
var middlewares = MiddlewareConfig() // Create _empty_ middleware config
/// middlewares.use(FileMiddleware.self) // Serves files from `Public/` directory
middlewares.use(ErrorMiddleware.self) // Catches errors and converts to HTTP response
services.register(middlewares)



/// Register the configured SQLite database to the database config.
var databases = DatabasesConfig()
let databaseConfig = MySQLDatabaseConfig(hostname: "192.168.0.5",
                                         username: "root",
                                         password: "admin",
                                         database: "vapor")
let database = MySQLDatabase(config: databaseConfig)

databases.add(database: database, as: .mysql)
services.register(databases)

/// Configure migrations
var migrations = MigrationConfig()
migrations.add(model:Acronym.self, database: .mysql)
//migrations.add(model: Todo.self, database: .sqlite)
services.register(migrations)

}
I get the following error, I think its an error of migration.
Thanks,
Arnold
Thread 1: Fatal error: Error raised at top level: :warning: MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ā€˜(6) , updatedAt DATETIME(6) )ā€™ at line 1

Hmm :thinking:Iā€™m not sure 5.1 is supported. I actually have no idea. Could you try running 5.7 in Docker?

have you tried it running 5.7 in Docker?

If you encounter problems when you try to connect to the MySQL server, the following items describe some courses of action you can take to correct the problem.

Make sure that the server is running. If it is not, clients cannot connect to it. For example, if an attempt to connect to the server fails with a message such as one of those following, one cause might be that the server is not running:

ERROR 2003: Canā€™t connect to MySQL server on ā€˜host_nameā€™ (111)
$> mysql
ERROR 2002: Canā€™t connect to local MySQL server through socket
ā€˜/tmp/mysql.sockā€™ (111)
It might be that the server is running, but you are trying to connect using a TCP/IP port, named pipe, or Unix socket file different from the one on which the server is listening. To correct this when you invoke a client program, specify a --port option to indicate the proper port number, or a --socket option to indicate the proper named pipe or Unix socket file. To find out where the socket file is, you can use this command:

Make sure that the server has not been configured to ignore network connections or (if you are attempting to connect remotely) that it has not been configured to listen only locally on its network interfaces. If the server was started with the skip_networking system variable enabled, no TCP/IP connections are accepted. If the server was started with the bind_address system variable set to 127.0.0.1, it listens for TCP/IP connections only locally on the loopback interface and does not accept remote connections.

Check to make sure that there is no firewall blocking access to MySQL. Your firewall may be configured on the basis of the application being executed, or the port number used by MySQL for communication (3306 by default). Under Linux or Unix, check your IP tables (or similar) configuration to ensure that the port has not been blocked. Under Windows, applications such as ZoneAlarm or Windows Firewall may need to be configured not to block the MySQL port.

The grant tables must be properly set up so that the server can use them for access control. For some distribution types (such as binary distributions on Windows, or RPM and DEB distributions on Linux), the installation process initializes the MySQL data directory, including the mysql system database containing the grant tables. For distributions that do not do this, you must initialize the data directory manually. For details, see Chapter 3, Postinstallation Setup and Testing.

To determine whether you need to initialize the grant tables, look for a mysql directory under the data directory. (The data directory normally is named data or var and is located under your MySQL installation directory.) Make sure that you have a file named user.MYD in the mysql database directory. If not, initialize the data directory. After doing so and starting the server, you should be able to connect to the server.

After a fresh installation, if you try to log on to the server as root without using a password, you might get the following error message.

ERROR 1045 (28000): Access denied for user ā€˜rootā€™@ā€˜localhostā€™ (using password: NO)
It means a root password has already been assigned during installation and it has to be supplied. See Section 3.4, ā€œSecuring the Initial MySQL Accountā€ on the different ways the password could have been assigned and, in some cases, how to find it. If you need to reset the root password, see instructions in How to Reset the Root Password. After you have found or reset your password, log on again as root using the --password (or -p) option:

Enter password:
However, the server is going to let you connect as root without using a password if you have initialized MySQL using mysqld --initialize-insecure (see Section 3.1, ā€œInitializing the Data Directoryā€ for details). That is a security risk, so you should set a password for the root account; see Section 3.4, ā€œSecuring the Initial MySQL Accountā€ for instructions.

If you have updated an existing MySQL installation to a newer version, did you perform the MySQL upgrade procedure? If not, do so. The structure of the grant tables changes occasionally when new capabilities are added, so after an upgrade you should always make sure that your tables have the current structure. For instructions, see Upgrading MySQL.

If a client program receives the following error message when it tries to connect, it means that the server expects passwords in a newer format than the client is capable of generating:

Client does not support authentication protocol requested
by server; consider upgrading MySQL client
Remember that client programs use connection parameters specified in option files or environment variables. If a client program seems to be sending incorrect default connection parameters when you have not specified them on the command line, check any applicable option files and your environment. For example, if you get Access denied when you run a client without any options, make sure that you have not specified an old password in any of your option files!

Regards,
Rachel Gomez