Solved it.
It seems like after loading the rc file some files are loaded after it for example the internet connections.
So i placed in my script before starting the mysql conenction a delay of 20 sec.
Now everything is fine and working perfect.
Dit is wel echt het minimum wat je gebruikt van adapter.Ik heb er een 5V 0.7A lader aan gehangen