How to point MySQL to another port then 3306

Hello everybody,

today I want to describe how to point to non standard port in My SQL for Acumatica.

Below goes fragment from my Web.config

    <remove name="ProjectX" />
    <add name="ProjectX" providerName="System.Data.SqlClient" connectionString="Server=localhost;Port=4040;Database=PXProjectionMySql2;Uid

you can use this knowledge for having multiple MySQL instances on the same machine and for catching generated SQL queries.

How to install MySQL proxy

Hello everybody,

quick post on how to install MySQL proxy. You may be puzzled why it is needed? Because MySQL proxy allows you to track all generated SQL by MySQL. As of now, you can catch generated SQL for SQL server with SQL Server Request Profiler. But in order to achieve it for MySQL, you'll need to use MySQL proxy.

So, first step will be download MySQL proxy archive and unzip it to some folder on your drive. 

Then in command prompt ( not in powershell ) execute something like this:

sc create "Proxy" DisplayName="MySQL Proxy" start="auto" binPath="d:\Install\mysql-proxy-0.8.5-windows-x86-32bit\bin\mysql-proxy-svc.exe"

And then this:

net start proxy

Those two commands will allow you to have MySQL proxy installed. In my future post I will mention how to track all generated SQL. I hope I will figure it out.

Performance difference in Acumatica between MS SQL and MySQL

Hello everybody,

today I want to write a few words about performance difference between MySQL and MS SQL in Acumatica.

Relatively recently Acumatica provided possibility to use MySQL as it's database. For some unknown reason

I didn't notice anybody who decided to use MySQL as their database solution. If you know any, please let me know,

how they like their experience. 

For me as developer it become interesting to check performance of MySQL vs MS SQL. Especially from standpoint of servers. 

Take note on how one of mine task managers look like:

as you can see I have 40 logical cores or 20 physical cores. Try to guess what is price of license for MS SQL for using at such a computer? According to this link one core costs 14 256 $, or 285 120$. Definetely prety costly.

And what would be price of MySQL for such a machine? Zero.

From this comparison MySQL looks very attractive. What about performance?

In order to test it, I've created small button code that executes creation of sales orders, and in the end gives some numbers. Below goes the code for cases if you wish to try it by yourself and compare my results with yours:

public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
        public PXAction<SOOrder> Test;
        [PXUIField(DisplayName = "Test", MapEnableRights = PXCacheRights.Update, MapViewRights = PXCacheRights.Update)]
        public virtual IEnumerable test(PXAdapter adapter)
            PXLongOperation.StartOperation(this, ()=>
                var graph = PXGraph.CreateInstance<SOOrderEntry>();
            return adapter.Get();
        private const int smallTest = 10;
        private const int mediumTest = 100;
        private const int bigTest = 500;
        private const int bigerTest = 1000;
        private const int bigerTest2 = 1500;
        public static void CreateSalesOrders(SOOrderEntry graph)
            StringBuilder sb = new StringBuilder();
            var sw = new Stopwatch();
            ExecuteSOCreationInCycle(graph, sw, sb, smallTest);
            ExecuteSOCreationInCycle(graph, sw, sb, mediumTest);
            ExecuteSOCreationInCycle(graph, sw, sb, bigTest);
            ExecuteSOCreationInCycle(graph, sw, sb, bigerTest);
            ExecuteSOCreationInCycle(graph, sw, sb, bigerTest2);
            using (StreamWriter file =
                new StreamWriter(@"e:\Acumatica\results.txt"))
        private static void ExecuteSOCreationInCycle(SOOrderEntry graph, Stopwatch sw, StringBuilder log, int numberOfCycles)
            for (int i = 0; i < numberOfCycles; i++)
            log.Append($"{numberOfCycles} Sales orders = {sw.ElapsedMilliseconds} milliseconds\r\n");
        private static void CreateSO(SOOrderEntry graph)
                var newSoOrder = graph.Document.Insert();
                graph.Document.SetValueExt<SOOrder.customerID>(graph.Document.Current, 4901);
                graph.Document.SetValueExt<SOOrder.status>(graph.Document.Current, "N");
                var transaction = graph.Transactions.Insert();
                graph.Transactions.SetValueExt<SOLine.inventoryID>(transaction, 456);
                graph.Transactions.SetValueExt<SOLine.orderQty>(transaction, 5.0m);
                graph.Transactions.SetValueExt<SOLine.curyUnitPrice>(transaction, 6.0m);
            catch (Exception ex)

Basically that code adds button Test on screen Sales orders, and if you click on that button, it will execute single thread that will measure how many milliseconds it will take to create 10, 100, 500, 1000, 1500 sales orders. 

Below goes table which describes results on MS SQL and MySQL:

  MS SQL MySql
ms for 10 Sales Orders 9082 11005
ms for 100 Sales Orders 57059 70894
ms for 500 Sales Orders 332826 400403
ms for 1000 Sales Orders 1064203 1239445
ms for 1500 Sales Orders 2540225 2891575

As you can see from the table, MS SQL is as usually around 20% faster then MySql.

If you prefer to see diagrams, here is the one:


lower means better in this case.


As you see from the test, MySql is slower on 20% then MS SQL. It means that if you need something 20% faster then the other and can affort it, go on MS SQL. If you want to get cheaper, and don't plan to have huge loading on your Acumatica then MySQL can help you to save some money