By default MySQL is started on port 3306 and MariaDB on port 3307. Here is an example using PDO to access a database named wordpress installed on MySQL and MariaDB :
$mysql=newPDO('mysql:host=127.0.0.1;port=3306;dbname=wordpress','root','');$mysqlStmt=$mysql->query("SELECT * FROM wp_comments");var_dump($mysqlStmt->fetchAll(PDO::FETCH_ASSOC));$mariadb=newPDO('mysql:host=127.0.0.1;port=3307;dbname=wordpress','root','');$mariadbStmt=$mariadb->query("SELECT * FROM wp_comments");var_dump($mariadbStmt->fetchAll(PDO::FETCH_ASSOC));
Features
Portable
Bearsampp is a portable application and therefore ideally suited to bring all your development across different computers.
One place to download the latest release and modules for your binaries, tools and applications.
Easily Switch
Easily switch between different versions of your modules.
Effective Homepage
An effective homepage gathering all the information you need is available at http://localhost or https://localhost.
Nice Console
A nice console is available to execute your commands and open the shell you need
Our Supporters
Sorry, this website uses features that your browser doesn't support. Upgrade to a newer version of Firefox, Chrome, Safari, or Edge and you'll be all set.
AI-powered knowledge base assistant. Press Ctrl+/ to open, Escape to close.
Knowledge Base Chat
Hello! I'm your AI assistant. Ask me anything about our knowledge base and I'll help you find the information you need.