I installed with Postgres, how to switch to MySQL

Questions and answers regarding general SQL and backend databases

I installed with Postgres, how to switch to MySQL

Postby datacraftsteve » Fri Apr 11, 2014 6:28 am

Sorry, this must be a super elementary question so I'm embarrassed to post it. But I can't figure this out.

I installed Servoy 7.4.0 with postgres in my windows 7 i3 laptop. I will be using dates in my app and don't want the time stamp and apparently postgres does not have a plain old date type. So, I want to switch to MySQL.

Per the video I watched, I downloaded the jar file and did the upload driver from Help->Servoy Admin Page and confirmed that the file:
mysql-connector-java-5.1.30-bin.jar
is in fact in: C:\Servoy\application_server\drivers\

Then I restarted Servoy, went to the solution explorer and right clicked on DataBase Servers -> Create New Database. But only postgres is listed as an option.

What do I need to do to get MySQL to show up in Servoy? Do I have to download and install MySQL and if so, is it the community version, work bench version or ? Or should I uninstall and re-install Servoy with MySQL as the default?

Thanks for any help
datacraftsteve
 
Posts: 5
Joined: Thu Apr 10, 2014 10:13 am

Re: I installed with Postgres, how to switch to MySQL

Postby jdbruijn » Fri Apr 11, 2014 8:21 am

Welcome to Servoy.

If you only want to show dates you can set the format of your calendar fields to dd/MM/yyyy.
To use mySQL you must have access to a mySQL server, on your development computer or on your network. Use the MySQL tools to create a database on that server and in Servoy make a connection to this database.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: I installed with Postgres, how to switch to MySQL

Postby sovanm » Fri Apr 11, 2014 8:33 am

Hi,

I see this is your first post, welcome to the community... :)

Servoy comes in bundled with PostgreSQL that why we need not to install PostgreSQL, but if you want to use MySQL as your database then you need to install mySQL in your system, create database schema and then you need to connect servoy with that MySQL database schema.

Database Server -> (right click) connect to existing database -> MySQL -> Provide the necessary settings. If it gets saved successfully then all is okay. You can see the tables listings..

Hope this will help you.

Thanks
sovanm
 
Posts: 99
Joined: Fri Oct 28, 2011 1:55 pm
Location: Bhubaneswar, India

Re: I installed with Postgres, how to switch to MySQL

Postby ROCLASI » Fri Apr 11, 2014 9:28 am

Hi Steve,

datacraftsteve wrote:I will be using dates in my app and don't want the time stamp and apparently postgres does not have a plain old date type.

PostgreSQL supports a wide variety of datatypes including TIMESTAMP, DATE and TIME where you can have the DATE and TIME types with or without timezone support.

I assume you are trying to create columns using the table interface inside Servoy. That interface is very (very) limited. You should be using an appropiate DBA tool, like in PostgreSQL's case, PgAdmin.

As for creating a MySQL database. Servoy only has built-in support to create a database in PostgreSQL because they bundle it. With any other database vendor you need to use the appropiate DBA tool for that RDBMS version. So in MySQL's case you can use MySQL Workbench. Then after you create the DB you create a connection inside Servoy to this DB.

So long story short. With any RDBMS you want to use with Servoy you can use Servoy to create certain DB objects (mainly tables and columns) but to have more control (like renaming and changing length/scale/not-null for instance) you have to use the appropriate DBA tool for the database vendor of your choice.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: I installed with Postgres, how to switch to MySQL

Postby datacraftsteve » Tue Apr 15, 2014 8:18 pm

Thanks Roclasi and Jos! Your info was a huge help.
Steve
datacraftsteve
 
Posts: 5
Joined: Thu Apr 10, 2014 10:13 am


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 9 guests